diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-09-07 08:46:03 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-09-07 08:46:03 +0100 |
commit | 5c53154b6190af523ec097dbb76c41685052dddd (patch) | |
tree | 8c1fccceda1bec3eb81f75400c5b6beab784a809 /xen/include/asm-x86/io_apic.h | |
parent | cda2f6c76132090176f4b88c84917861c21bd21c (diff) | |
download | xen-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/io_apic.h')
-rw-r--r-- | xen/include/asm-x86/io_apic.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h index 14cca8d9ed..c5d212c0a3 100644 --- a/xen/include/asm-x86/io_apic.h +++ b/xen/include/asm-x86/io_apic.h @@ -105,6 +105,9 @@ struct IO_APIC_route_entry { __reserved_1 : 24, logical_dest : 8; } logical; + + /* used when Interrupt Remapping with EIM is enabled */ + __u32 dest32; } dest; } __attribute__ ((packed)); |