[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvm, 32-on-64: Allow a 32-bit x86 hvm guest access to any memory_op().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213361423 -3600
# Node ID 2363cf4ab4cb68b03f9e44f0680a76aeafa0d1b4
# Parent  6e92603ed9f29d8599d330af7b69d443d1155340
hvm, 32-on-64: Allow a 32-bit x86 hvm guest access to any memory_op().
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   36 +++---------------------------------
 1 files changed, 3 insertions(+), 33 deletions(-)

diff -r 6e92603ed9f2 -r 2363cf4ab4cb xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Jun 13 13:49:56 2008 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Fri Jun 13 13:50:23 2008 +0100
@@ -1871,39 +1871,9 @@ static hvm_hypercall_t *hvm_hypercall32_
 
 static long hvm_memory_op_compat32(int cmd, XEN_GUEST_HANDLE(void) arg)
 {
-    extern long do_add_to_physmap(struct xen_add_to_physmap *xatp);
-    long rc;
-
-    switch ( cmd )
-    {
-    case XENMEM_add_to_physmap:
-    {
-        struct {
-            domid_t domid;
-            uint32_t space;
-            uint32_t idx;
-            uint32_t gpfn;
-        } u;
-        struct xen_add_to_physmap *h = (void *)COMPAT_ARG_XLAT_VIRT_BASE;
-
-        if ( copy_from_guest(&u, arg, 1) )
-            return -EFAULT;
-
-        h->domid = u.domid;
-        h->space = u.space;
-        h->idx = u.idx;
-        h->gpfn = u.gpfn;
-
-        rc = hvm_memory_op(cmd, guest_handle_from_ptr(h, void));
-        break;
-    }
-
-    default:
-        gdprintk(XENLOG_WARNING, "memory_op %d.\n", cmd);
-        rc = -ENOSYS;
-        break;
-    }
-
+    long rc = compat_memory_op(cmd, arg);
+    if ( (cmd & MEMOP_CMD_MASK) == XENMEM_decrease_reservation )
+        current->domain->arch.hvm_domain.qemu_mapcache_invalidate = 1;
     return rc;
 }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.