• Sean Christopherson's avatar
    KVM: x86: Explicitly track all possibilities for APIC map's logical modes · 35366901
    Sean Christopherson authored
    Track all possibilities for the optimized APIC map's logical modes
    instead of overloading the pseudo-bitmap and treating any "unknown" value
    as "invalid".
    
    As documented by the now-stale comment above the mode values, the values
    did have meaning when the optimized map was originally added.  That
    dependent logical was removed by commit e45115b6 ("KVM: x86: use
    physical LAPIC array for logical x2APIC"), but the obfuscated behavior
    and its comment were left behind.
    
    Opportunistically rename "mode" to "logical_mode", partly to make it
    clear that the "disabled" case applies only to the logical map, but also
    to prove that there is no lurking code that expects "mode" to be a bitmap.
    
    Functionally, this is a glorified nop.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Message-Id: <20230106011306.85230-19-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    35366901
kvm_host.h 65.9 KB