KVM: x86: Do not block APIC write for non ICR registers
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 25 Jul 2022 05:33:56 +0000 (00:33 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Jul 2022 17:51:42 +0000 (13:51 -0400)
commit1bd9dfec9fd419920572b057e2c98d9877190b06
treeac596810d033e95412a80c39782aeb9249b3fe52
parent0a8735a6acf36ac35499563dc44f3e3d5034a2ce
KVM: x86: Do not block APIC write for non ICR registers

The commit 5413bcba7ed5 ("KVM: x86: Add support for vICR APIC-write
VM-Exits in x2APIC mode") introduces logic to prevent APIC write
for offset other than ICR in kvm_apic_write_nodecode() function.
This breaks x2AVIC support, which requires KVM to trap and emulate
x2APIC MSR writes.

Therefore, removes the warning and modify to logic to allow MSR write.

Fixes: 5413bcba7ed5 ("KVM: x86: Add support for vICR APIC-write VM-Exits in x2APIC mode")
Cc: Zeng Guang <guang.zeng@intel.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Message-Id: <20220725053356.4275-1-suravee.suthikulpanit@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c