aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/io_apic.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-26 13:00:43 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-26 13:00:43 +0100
commitd6b6a1137f3b4183ae6deaf89c8e50426742ffb3 (patch)
tree874d68e58f9d607ce30e06f47dae8eb6243dda96 /xen/include/asm-x86/io_apic.h
parent2a82334fccca3fba00d580b89f5c323649447f21 (diff)
downloadxen-d6b6a1137f3b4183ae6deaf89c8e50426742ffb3.tar.gz
xen-d6b6a1137f3b4183ae6deaf89c8e50426742ffb3.tar.bz2
xen-d6b6a1137f3b4183ae6deaf89c8e50426742ffb3.zip
vtd: Fix ioapic interrupt remapping
Besides io_apic_write(), io_apic_modify() also writes to io apic RTE. This patch adds an intercept to remap interrupt in io_apic_modify(). In io_apic_read_remap_rte(), 'mask' value of RTE should not affect the return value, so remove its checking. Finally, remove panic() when index overflows. Instead, print error messages and report back the failure to upper level. Signed-off-by: Weidong Han <weidong.han@intel.com>
Diffstat (limited to 'xen/include/asm-x86/io_apic.h')
-rw-r--r--xen/include/asm-x86/io_apic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index b364e38d7f..0c3a14ce5b 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -125,7 +125,7 @@ extern int mpc_default_type;
static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
{
- if (vtd_enabled)
+ if (iommu_enabled)
return io_apic_read_remap_rte(apic, reg);
*IO_APIC_BASE(apic) = reg;
return *(IO_APIC_BASE(apic)+4);
@@ -152,6 +152,8 @@ extern int sis_apic_bug;
#endif
static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
{
+ if (iommu_enabled)
+ return iommu_update_ire_from_apic(apic, reg, value);
if (sis_apic_bug)
*IO_APIC_BASE(apic) = reg;
*(IO_APIC_BASE(apic)+4) = value;