diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-02-11 10:51:41 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-02-11 10:51:41 +0000 |
commit | be0999cb87d4e5fbaa9b96f604918db02229f71e (patch) | |
tree | 4547427239ceeb400356f98446bf50353f665030 /xen/include/asm-x86/io_apic.h | |
parent | b65a97ff7378c6aae7f3c9326823b58c29d28a07 (diff) | |
download | xen-be0999cb87d4e5fbaa9b96f604918db02229f71e.tar.gz xen-be0999cb87d4e5fbaa9b96f604918db02229f71e.tar.bz2 xen-be0999cb87d4e5fbaa9b96f604918db02229f71e.zip |
vt-d: Remap interrupt for passthru device if such HW is detected on VT-d platforms.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Diffstat (limited to 'xen/include/asm-x86/io_apic.h')
-rw-r--r-- | xen/include/asm-x86/io_apic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h index e8e102a6b8..86c91b6762 100644 --- a/xen/include/asm-x86/io_apic.h +++ b/xen/include/asm-x86/io_apic.h @@ -6,6 +6,7 @@ #include <asm/mpspec.h> #include <asm/apicdef.h> #include <asm/fixmap.h> +#include <asm/iommu.h> /* * Intel IO-APIC support for SMP and UP systems. @@ -124,12 +125,16 @@ extern int mpc_default_type; static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) { + if (vtd_enabled) + return io_apic_read_remap_rte(apic, reg); *IO_APIC_BASE(apic) = reg; return *(IO_APIC_BASE(apic)+4); } static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) { + if (vtd_enabled) + return io_apic_write_remap_rte(apic, reg, value); *IO_APIC_BASE(apic) = reg; *(IO_APIC_BASE(apic)+4) = value; } |