aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/msi.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-09-07 08:46:03 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-09-07 08:46:03 +0100
commit5c53154b6190af523ec097dbb76c41685052dddd (patch)
tree8c1fccceda1bec3eb81f75400c5b6beab784a809 /xen/include/asm-x86/msi.h
parentcda2f6c76132090176f4b88c84917861c21bd21c (diff)
downloadxen-5c53154b6190af523ec097dbb76c41685052dddd.tar.gz
xen-5c53154b6190af523ec097dbb76c41685052dddd.tar.bz2
xen-5c53154b6190af523ec097dbb76c41685052dddd.zip
vt-d: use 32-bit Destination ID when Interrupt Remapping with EIM is
enabled When x2APIC and Interrupt Remapping(IR) with EIM are enabled, we should use 32-bit Destination ID for IOAPIC and MSI. We implemented the IR support in xen by hooking the functions like io_apic_write(),io_apic_modify(), write_msi_message(), and as a result, in the hook functions in intremap.c, we can only see the 8-bit dest id rather the 32-bit id, so we can't set IR table Entry that requires a 32-bit dest id. To solve the issue throughly, we need find every place in io_apic.c and msi.c that could write ioapic RTE and and device's msi message and explicitly handle the 32-bit dest id carefully (namely, when genapic is x2apic, cpu_mask_to_apic could return a 32-bit value); and we have to change the iommu_ops->{.update_ire_from_apic, .update_ire_from_msi} interfaces. We may have to write an over-1000-LOC patch for this. Instead, we could use a workround: 1) for ioapic, in the struct IO_APIC_route_entry, we could use a new "dest32" to refer to the dest field; 2) for msi, in the struct msi_msg, we could add a new "u32 dest". And in intremap.c, if x2apic_enabled, we use the new names to refer to the dest fields. We can improve this in future. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'xen/include/asm-x86/msi.h')
-rw-r--r--xen/include/asm-x86/msi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index dc9877b0a2..9df5ccb193 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -65,6 +65,7 @@ struct msi_msg {
u32 address_lo; /* low 32 bits of msi message address */
u32 address_hi; /* high 32 bits of msi message address */
u32 data; /* 16 bits of msi message data */
+ u32 dest32; /* used when Interrupt Remapping with EIM is enabled */
};
struct msi_desc;