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] Add cmpxchg8b support for writable page tables

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add cmpxchg8b support for writable page tables
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 22 Jun 2005 17:40:09 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Wed, 22 Jun 2005 18:00:24 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1729, 2005/06/22 18:40:09+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Add cmpxchg8b support for writable page tables
        (emulation code path), which is needed to make atomic pae l1
        page table updates work.
        Signed-off-by: Scott Parish <srparish@xxxxxxxxxx>
        



 mm.c |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)


diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c 2005-06-22 14:01:34 -04:00
+++ b/xen/arch/x86/mm.c 2005-06-22 14:01:34 -04:00
@@ -2793,12 +2793,24 @@
     return ptwr_emulated_update(addr, old, new, bytes, 1);
 }
 
+static int ptwr_emulated_cmpxchg8b(
+    unsigned long addr,
+    unsigned long old,
+    unsigned long old_hi,
+    unsigned long new,
+    unsigned long new_hi)
+{
+    return ptwr_emulated_update(
+        addr, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1);
+}
+
 static struct x86_mem_emulator ptwr_mem_emulator = {
-    .read_std         = x86_emulate_read_std,
-    .write_std        = x86_emulate_write_std,
-    .read_emulated    = x86_emulate_read_std,
-    .write_emulated   = ptwr_emulated_write,
-    .cmpxchg_emulated = ptwr_emulated_cmpxchg
+    .read_std           = x86_emulate_read_std,
+    .write_std          = x86_emulate_write_std,
+    .read_emulated      = x86_emulate_read_std,
+    .write_emulated     = ptwr_emulated_write,
+    .cmpxchg_emulated   = ptwr_emulated_cmpxchg,
+    .cmpxchg8b_emulated = ptwr_emulated_cmpxchg8b
 };
 
 /* Write page fault handler: check if guest is trying to modify a PTE. */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add cmpxchg8b support for writable page tables, BitKeeper Bot <=