KVM: SVM: Add irqchip_split() checks before enabling AVIC
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 12 Sep 2017 15:42:42 +0000 (10:42 -0500)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 14 Sep 2017 15:05:13 +0000 (17:05 +0200)
commit67034bb9dd5ecc0171bdacfbd31ebf7c2634df98
treec9d34283e272a3244cf42c900eb226bb1aa35e01
parentb2a05feff274e007abd7cda0d2cdae7fdf5cbb0a
KVM: SVM: Add irqchip_split() checks before enabling AVIC

SVM AVIC hardware accelerates guest write to APIC_EOI register
(for edge-trigger interrupt), which means it does not trap to KVM.

So, only enable SVM AVIC only in split irqchip mode.
(e.g. launching qemu w/ option '-machine kernel_irqchip=split').

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Fixes: 44a95dae1d22 ("KVM: x86: Detect and Initialize AVIC support")
[Removed pr_debug - Radim.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/svm.c