These days there are too many AVIC/APICv inhibit
reasons, and it doesn't hurt to have some documentation
for them.

Signed-off-by: Maxim Levitsky <mlevi...@redhat.com>
---
 arch/x86/include/asm/kvm_host.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index f164c6c1514a4..63eae00625bda 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -1046,14 +1046,29 @@ struct kvm_x86_msr_filter {
 };
 
 enum kvm_apicv_inhibit {
+       /* APICv/AVIC is disabled by module param and/or not supported in 
hardware */
        APICV_INHIBIT_REASON_DISABLE,
+       /* APICv/AVIC is inhibited because AutoEOI feature is being used by a 
HyperV guest*/
        APICV_INHIBIT_REASON_HYPERV,
+       /* AVIC is inhibited on a CPU because it runs a nested guest */
        APICV_INHIBIT_REASON_NESTED,
+       /* AVIC is inhibited due to wait for an irq window (AVIC doesn't 
support this) */
        APICV_INHIBIT_REASON_IRQWIN,
+       /*
+        * AVIC is inhibited because i8254 're-inject' mode is used
+        * which needs EOI intercept which AVIC doesn't support
+        */
        APICV_INHIBIT_REASON_PIT_REINJ,
+       /* AVIC is inhibited because the guest has x2apic in its CPUID*/
        APICV_INHIBIT_REASON_X2APIC,
+       /* AVIC/APICv is inhibited because KVM_GUESTDBG_BLOCKIRQ was enabled */
        APICV_INHIBIT_REASON_BLOCKIRQ,
+       /*
+        * AVIC/APICv is inhibited because the guest didn't yet
+        * enable kernel/split irqchip
+        */
        APICV_INHIBIT_REASON_ABSENT,
+       /* AVIC is disabled because SEV doesn't support it */
        APICV_INHIBIT_REASON_SEV,
 };
 
-- 
2.26.3

Reply via email to