diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-09 16:51:03 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-09 16:51:03 +0100 |
commit | d1ffda5cf50c6fcd7a69d0b76325783197048de6 (patch) | |
tree | 099bd216d4dbe4b4c7142e10bbd881e82309ae3d | |
parent | 4f874dc24ffe0b2c49d3eb89c7abc453eccde007 (diff) | |
download | xen-d1ffda5cf50c6fcd7a69d0b76325783197048de6.tar.gz xen-d1ffda5cf50c6fcd7a69d0b76325783197048de6.tar.bz2 xen-d1ffda5cf50c6fcd7a69d0b76325783197048de6.zip |
vt-d: Fix ioapic write order in io_apic_write_remap_rte
At the end of io_apic_write_remap_rte, it writes new entry (remapped
interrupt) to ioapic. But it writes low 32 bits before high 32 bits,
it unmasks interrupt before writing high 32 bits if 'mask' bit in low
32 bits is cleared. Thus it may result in issues. This patch fixes
this issue by writing high 32 bits before low 32 bits.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
xen-unstable changeset: 21933:add40eb47868
xen-unstable date: Mon Aug 09 16:32:45 2010 +0100
-rw-r--r-- | xen/drivers/passthrough/vtd/intremap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 1c2ff1bf67..21b8e82d21 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -442,10 +442,10 @@ void io_apic_write_remap_rte( } /* write new entry to ioapic */ - *IO_APIC_BASE(apic) = reg; - *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); *IO_APIC_BASE(apic) = reg + 1; *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+1); + *IO_APIC_BASE(apic) = reg; + *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); } #if defined(__i386__) || defined(__x86_64__) |