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-3.1-testing] [XEN, 32on64]: Correct continuation tr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] [XEN, 32on64]: Correct continuation translation for large
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Dec 2007 03:10:49 -0800
Delivery-date: Mon, 10 Dec 2007 04:46:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196962541 0
# Node ID b4331a2778bcbc421db82cbf256fb83f6c733c66
# Parent  66074beedb2cfc3e2201da5001c0fa113664b832
[XEN, 32on64]: Correct continuation translation for large
compat_mmuext hypercalls.

At the point where we translate the continuation "nat_ops" points to
the beginning of the batch of "i" entries, therefore it must be
incremented by the number of entries processed "i - left". At the same
point "cmp_uops" points to the end of the batch of entries and must
therefore be decremented by "left".

The new count value has already been set by do_mmuext_op to "left" and
therefore it is correct to add "count - i" since that is the number of
entries that remain after this batch.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
xen-unstable changeset:   16543:46776e65e6796f7751a15649f275b78e848d7ed5
xen-unstable date:        Thu Dec 06 11:24:02 2007 +0000
---
 xen/arch/x86/x86_64/compat/mm.c    |    5 ++---
 xen/include/asm-x86/guest_access.h |    1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r 66074beedb2c -r b4331a2778bc xen/arch/x86/x86_64/compat/mm.c
--- a/xen/arch/x86/x86_64/compat/mm.c   Thu Dec 06 17:35:04 2007 +0000
+++ b/xen/arch/x86/x86_64/compat/mm.c   Thu Dec 06 17:35:41 2007 +0000
@@ -298,9 +298,8 @@ int compat_mmuext_op(XEN_GUEST_HANDLE(mm
 
                 BUG_ON(left == arg1);
                 BUG_ON(left > count);
-                guest_handle_add_offset(nat_ops, count - left);
-                BUG_ON(left + i < count);
-                guest_handle_add_offset(cmp_uops, (signed int)(count - left - 
i));
+                guest_handle_add_offset(nat_ops, i - left);
+                guest_handle_subtract_offset(cmp_uops, left);
                 left = 1;
                 BUG_ON(!hypercall_xlat_continuation(&left, 0x01, nat_ops, 
cmp_uops));
                 BUG_ON(left != arg1);
diff -r 66074beedb2c -r b4331a2778bc xen/include/asm-x86/guest_access.h
--- a/xen/include/asm-x86/guest_access.h        Thu Dec 06 17:35:04 2007 +0000
+++ b/xen/include/asm-x86/guest_access.h        Thu Dec 06 17:35:41 2007 +0000
@@ -17,6 +17,7 @@
 
 /* Offset the given guest handle into the array it refers to. */
 #define guest_handle_add_offset(hnd, nr) ((hnd).p += (nr))
+#define guest_handle_subtract_offset(hnd, nr) ((hnd).p -= (nr))
 
 /* Cast a guest handle to the specified type of handle. */
 #define guest_handle_cast(hnd, type) ({         \

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] [XEN, 32on64]: Correct continuation translation for large, Xen patchbot-3.1-testing <=