WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] vt-d: Fix ioapic_rte_to_remap_entry er

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] vt-d: Fix ioapic_rte_to_remap_entry error path.
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Aug 2010 02:45:18 -0700
Delivery-date: Thu, 12 Aug 2010 02:45:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1281369090 -3600
# Node ID 6b05eb35f1a9da79cc36fe0cf780b72678ef0a11
# Parent  101d44e16b72c7cabb70f3ab534391c0681f40b3
vt-d: Fix ioapic_rte_to_remap_entry error path.

When ioapic_rte_to_remap_entry fails, currently it just writes value
to ioapic. But the 'mask' bit may be changed if it writes to the upper
half of RTE. This patch ensures to recover the original value of
'mask' bit in this case.

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
xen-unstable changeset:   21934:befd1814c0a2
xen-unstable date:        Mon Aug 09 16:33:45 2010 +0100
---
 xen/drivers/passthrough/vtd/intremap.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r 101d44e16b72 -r 6b05eb35f1a9 xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c    Mon Aug 09 16:51:03 2010 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c    Mon Aug 09 16:51:30 2010 +0100
@@ -438,6 +438,13 @@ void io_apic_write_remap_rte(
     {
         *IO_APIC_BASE(apic) = rte_upper ? (reg + 1) : reg;
         *(IO_APIC_BASE(apic)+4) = value;
+
+        /* Recover the original value of 'mask' bit */
+        if ( rte_upper )
+        {
+            *IO_APIC_BASE(apic) = reg;
+            *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0);
+        }
         return;
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] vt-d: Fix ioapic_rte_to_remap_entry error path., Xen patchbot-4.0-testing <=