mbox series

[v2,0/2] KVM: Only use posted interrupts for Fixed/LowPrio MSIs

Message ID 20190904133511.17540-1-graf@amazon.com (mailing list archive)
Headers show
Series KVM: Only use posted interrupts for Fixed/LowPrio MSIs | expand

Message

Alexander Graf Sept. 4, 2019, 1:35 p.m. UTC
The MSI-X descriptor has a "delivery mode" field which can be set to
various different targets, such as "Fixed" (default), SMI, NMI or INIT.

Usually when we pass devices into guests, we only ever see this MSI-X
descriptor configured as Fixed, so nobody realized that the other modes
were broken when using posted interrupts.

With posted interrupts, we end up configuring these special modes just
the same as a Fixed interrupt. That means instead of generating an SMI,
we inject a normal GSI into the guest.

Of course, that if completely broken. These two patches attempt to fix
the situation for x86 systems. If anyone has a great idea how to generalize
the filtering though, I'm all ears.


Alex

---

v1 -> v2:

  - Make error message more unique
  - Update commit message to point to __apic_accept_irq()

Alexander Graf (2):
  KVM: VMX: Disable posted interrupts for odd IRQs
  KVM: SVM: Disable posted interrupts for odd IRQs

 arch/x86/kvm/svm.c     | 16 ++++++++++++++++
 arch/x86/kvm/vmx/vmx.c | 22 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)