• Sean Christopherson's avatar
    KVM: selftests: Add test to verify KVM handling of ICR · 85c68eb4
    Sean Christopherson authored
    The main thing that the selftest verifies is that KVM copies x2APIC's
    ICR[63:32] to/from ICR2 when userspace accesses the vAPIC page via
    KVM_{G,S}ET_LAPIC.  KVM previously split x2APIC ICR to ICR+ICR2 at the
    time of write (from the guest), and so KVM must preserve that behavior
    for backwards compatibility between different versions of KVM.
    
    It will also test other invariants, e.g. that KVM clears the BUSY
    flag on ICR writes, that the reserved bits in ICR2 are dropped on writes
    from the guest, etc...
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220204214205.3306634-12-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    85c68eb4
apic.h 2.4 KB