Skip to content

apic: Implement handling for MSI redirection hint in IRQ delivery

James Sullivan qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3apic: Added helper function apic_match_dest, apic_match_[physical, logical]_desthw/intc/apic.c+26 -00 replies
2/3apic: Set and pass in RH bit for MSI interruptshw/intc/apic.c hw/intc/ioapic.c include/hw/i386/apic.h +1 more+10 -70 replies
3/3apic: Implement handling of RH=1 for MSI interrupt deliveryhw/intc/apic.c+20 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] apic: Implement handling for MSI redirection hint in IRQ delivery

This set of patches implements handling for the MSI redirection hint bit. The RH bit is used in logical destination mode to indicate that the delivery of the interrupt shall only be to the lowest priority candidate LAPIC.

Currently, there is no handling of the MSI RH bit. This patch implements the following logic:

* DM=0, RH=* : Physical destination mode. Interrupt is delivered to the LAPIC with the matching APIC ID. (Subject to the usual restrictions, i.e. no broadcast dest)
* DM=1, RH=0 : Logical destination mode without redirection. Interrupt is delivered to all LAPICs in the logical group specified by the IRQ's destination map and delivery mode.
* DM=1, RH=1 : Logical destination mode with redirection. Interrupt is delivered only to the lowest priority LAPIC in the logical group specified by the dest map and the delivery mode. Delivery semantics are otherwise specified by the delivery_mode of the IRQ, which is unchanged.

These changes reflect those made in the KVM in
http://www.spinics.net/lists/kvm/msg114915.html ("kvm: x86: Implement handling of RH=1 for MSI delivery in KVM"), which are under review but are largely settled in terms of functionality.

James Sullivan (3):
apic: Added helper function apic_match_dest,
apic_match_[physical,logical]_dest
apic: Set and pass in RH bit for MSI interrupts
apic: Implement handling of RH=1 for MSI interrupt delivery

 hw/intc/apic.c         | 70 +++++++++++++++++++++++++++++++++++++-------------
 hw/intc/ioapic.c       |  2 +-
 include/hw/i386/apic.h |  3 ++-
 trace-events           |  2 +-
 4 files changed, 56 insertions(+), 21 deletions(-)
Signature · 1 line
2.3.3