Hi,
diff --git a/xen/arch/x86/x86_64/compat/mm.c b/xen/arch/x86/x86_64/compat/mm.c
index 2c05099..05c3098 100644
--- a/xen/arch/x86/x86_64/compat/mm.c
+++ b/xen/arch/x86/x86_64/compat/mm.c
@@ -63,6 +63,10 @@ int compat_arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
XLAT_add_to_physmap(nat, &cmp);
rc = arch_memory_op(op, guest_handle_from_ptr(nat, void));
+ XLAT_add_to_physmap(&cmp, nat);
+
+ if ( copy_to_guest(arg, &cmp, 1) )
+ return -EFAULT;
break;
}
I think you might need to do a bit more than this - have a look at how
XENMEM_get_pod_target is handled (in the same file), including
re-translating the hypercall continuation.
Please explicitly test the case where the hypercall gets interrupted and
the caller is a 32-bit compat guest, and make sure it does what you want.
(Apart from that the x86/mm parts of the series are now fine by me)
Cheers,
Tim.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|