lkml.org 
[lkml]   [2024]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v19 089/130] KVM: TDX: Add support for find pending IRQ in a protected local APIC
    Date
    On Mon, 2024-02-26 at 00:26 -0800, isaku.yamahata@intel.com wrote:
    >  
    > +static bool vt_protected_apic_has_interrupt(struct kvm_vcpu *vcpu)
    > +{
    > +       KVM_BUG_ON(!is_td_vcpu(vcpu), vcpu->kvm);
    > +
    > +       return tdx_protected_apic_has_interrupt(vcpu);
    > +}
    > +

    There was some internal discussion on whether to drop the KVM_BUG_ON() here, and
    then since vt_protected_apic_has_interrupt() would be just a simple call to
    tdx_protected_apic_has_interrupt(), just wire in
    tdx_protected_apic_has_interrupt() directly.

    The reasoning for dropping the KVM_BUG_ON() is that the function has "protected"
    in its name so is unlikely to be called in another context. It was apparently
    added when the TDX series was still new. But with the more mature series it
    doesn't seem likely to find any bugs. The caller checks
    vcpu->arch.apic->guest_apic_protected.
    \
     
     \ /
      Last update: 2024-05-27 16:40    [W:4.028 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site