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-unstable] x86: Enable GNTTABOP_copy hypercall for H

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Enable GNTTABOP_copy hypercall for HVMs
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Aug 2009 05:35:18 -0700
Delivery-date: Thu, 06 Aug 2009 05:36:19 -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 1249476575 -3600
# Node ID f1b10de90679307824ee7e4dcb265ce571c83816
# Parent  70ead50fabfd16809d5f721be86f13d1d56de408
x86: Enable GNTTABOP_copy hypercall for HVMs

This requires plumbing 32-bit compat guests through the compat version
of teh grant-table hypercall.

Signed-off-by: Jayaraman, Bhaskar <Bhaskar.Jayaraman@xxxxxxx>
---
 xen/arch/x86/hvm/hvm.c      |   15 +++++++++++++--
 xen/include/xen/hypercall.h |    6 ++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diff -r 70ead50fabfd -r f1b10de90679 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Aug 05 13:40:21 2009 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Wed Aug 05 13:49:35 2009 +0100
@@ -1999,7 +1999,8 @@ static long hvm_grant_table_op(
     unsigned int cmd, XEN_GUEST_HANDLE(void) uop, unsigned int count)
 {
     if ( (cmd != GNTTABOP_query_size) && (cmd != GNTTABOP_setup_table) &&
-         (cmd != GNTTABOP_map_grant_ref) && (cmd != GNTTABOP_unmap_grant_ref) )
+         (cmd != GNTTABOP_map_grant_ref) && (cmd != GNTTABOP_unmap_grant_ref) 
&&
+         (cmd != GNTTABOP_copy))
         return -ENOSYS; /* all other commands need auditing */
     return do_grant_table_op(cmd, uop, count);
 }
@@ -2051,6 +2052,16 @@ static hvm_hypercall_t *hvm_hypercall32_
 
 #else /* defined(__x86_64__) */
 
+static long hvm_grant_table_op_compat32(
+    unsigned int cmd, XEN_GUEST_HANDLE(void) uop, unsigned int count)
+{
+    if ( (cmd != GNTTABOP_query_size) && (cmd != GNTTABOP_setup_table) &&
+         (cmd != GNTTABOP_map_grant_ref) && (cmd != GNTTABOP_unmap_grant_ref) 
&&
+         (cmd != GNTTABOP_copy))
+        return -ENOSYS; /* all other commands need auditing */
+    return compat_grant_table_op(cmd, uop, count);
+}
+
 static long hvm_memory_op_compat32(int cmd, XEN_GUEST_HANDLE(void) arg)
 {
     long rc = compat_memory_op(cmd, arg);
@@ -2090,7 +2101,7 @@ static hvm_hypercall_t *hvm_hypercall64_
 
 static hvm_hypercall_t *hvm_hypercall32_table[NR_hypercalls] = {
     [ __HYPERVISOR_memory_op ] = (hvm_hypercall_t *)hvm_memory_op_compat32,
-    [ __HYPERVISOR_grant_table_op ] = (hvm_hypercall_t *)hvm_grant_table_op,
+    [ __HYPERVISOR_grant_table_op ] = (hvm_hypercall_t 
*)hvm_grant_table_op_compat32,
     [ __HYPERVISOR_vcpu_op ] = (hvm_hypercall_t *)hvm_vcpu_op_compat32,
     HYPERCALL(xen_version),
     HYPERCALL(event_channel_op),
diff -r 70ead50fabfd -r f1b10de90679 xen/include/xen/hypercall.h
--- a/xen/include/xen/hypercall.h       Wed Aug 05 13:40:21 2009 +0100
+++ b/xen/include/xen/hypercall.h       Wed Aug 05 13:49:35 2009 +0100
@@ -129,6 +129,12 @@ compat_memory_op(
     XEN_GUEST_HANDLE(void) arg);
 
 extern int
+compat_grant_table_op(
+    unsigned int cmd,
+    XEN_GUEST_HANDLE(void) uop,
+    unsigned int count);
+
+extern int
 compat_vcpu_op(
     int cmd,
     int vcpuid,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Enable GNTTABOP_copy hypercall for HVMs, Xen patchbot-unstable <=