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] [XEN] Move hvm get/set domctl() commands

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Move hvm get/set domctl() commands to arch/x86/domctl.c.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Jan 2007 09:10:10 -0800
Delivery-date: Sat, 20 Jan 2007 09:10:09 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169229840 0
# Node ID 701afa77106ae331714db968090bc1b0370c7714
# Parent  d4ed1deee42dab3c2b5da78892cb086a064dbd88
[XEN] Move hvm get/set domctl() commands to arch/x86/domctl.c.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domctl.c |   73 ++++++++++++++++++++++++++++++++++++++++++++++++++
 xen/common/domctl.c   |   73 --------------------------------------------------
 2 files changed, 73 insertions(+), 73 deletions(-)

diff -r d4ed1deee42d -r 701afa77106a xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Fri Jan 19 17:58:30 2007 +0000
+++ b/xen/arch/x86/domctl.c     Fri Jan 19 18:04:00 2007 +0000
@@ -293,6 +293,79 @@ _long arch_do_domctl(
     }
     break;
 
+    case XEN_DOMCTL_sethvmcontext:
+    { 
+        struct hvm_domain_context *c;
+        struct domain             *d;
+        struct vcpu               *v;
+
+        ret = -ESRCH;
+        if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+            break;
+
+        ret = -ENOMEM;
+        if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
+            goto sethvmcontext_out;
+
+        v = d->vcpu[0];
+        
+        ret = -EFAULT;
+
+#ifndef CONFIG_COMPAT
+        if ( copy_from_guest(c, domctl->u.hvmcontext.ctxt, 1) != 0 )
+            goto sethvmcontext_out;
+
+        ret = arch_sethvm_ctxt(v, c);
+#endif
+
+        xfree(c);
+
+    sethvmcontext_out:
+        put_domain(d);
+
+    }
+    break;
+
+    case XEN_DOMCTL_gethvmcontext:
+    { 
+        struct hvm_domain_context *c;
+        struct domain             *d;
+        struct vcpu               *v;
+
+        ret = -ESRCH;
+        if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+            break;
+
+        ret = -ENOMEM;
+        if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
+            goto gethvmcontext_out;
+
+        v = d->vcpu[0];
+
+        ret = -ENODATA;
+        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+            goto gethvmcontext_out;
+        
+        ret = 0;
+        if (arch_gethvm_ctxt(v, c) == -1)
+            ret = -EFAULT;
+
+#ifndef CONFIG_COMPAT
+        if ( copy_to_guest(domctl->u.hvmcontext.ctxt, c, 1) )
+            ret = -EFAULT;
+
+        xfree(c);
+#endif
+
+        if ( copy_to_guest(u_domctl, domctl, 1) )
+            ret = -EFAULT;
+
+    gethvmcontext_out:
+        put_domain(d);
+
+    }
+    break;
+
     default:
         ret = -ENOSYS;
         break;
diff -r d4ed1deee42d -r 701afa77106a xen/common/domctl.c
--- a/xen/common/domctl.c       Fri Jan 19 17:58:30 2007 +0000
+++ b/xen/common/domctl.c       Fri Jan 19 18:04:00 2007 +0000
@@ -218,39 +218,6 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
     }
     break;
 
-    case XEN_DOMCTL_sethvmcontext:
-    { 
-        struct hvm_domain_context *c;
-        struct domain             *d;
-        struct vcpu               *v;
-
-        ret = -ESRCH;
-        if ( (d = find_domain_by_id(op->domain)) == NULL )
-            break;
-
-        ret = -ENOMEM;
-        if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
-            goto sethvmcontext_out;
-
-        v = d->vcpu[0];
-        
-        ret = -EFAULT;
-
-#ifndef CONFIG_COMPAT
-        if ( copy_from_guest(c, op->u.hvmcontext.ctxt, 1) != 0 )
-            goto sethvmcontext_out;
-
-        ret = arch_sethvm_ctxt(v, c);
-#endif
-
-        xfree(c);
-
-    sethvmcontext_out:
-        put_domain(d);
-
-    }
-    break;
-
     case XEN_DOMCTL_pausedomain:
     {
         struct domain *d = find_domain_by_id(op->domain);
@@ -605,46 +572,6 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
     }
     break;
 
-    case XEN_DOMCTL_gethvmcontext:
-    { 
-        struct hvm_domain_context *c;
-        struct domain             *d;
-        struct vcpu               *v;
-
-        ret = -ESRCH;
-        if ( (d = find_domain_by_id(op->domain)) == NULL )
-            break;
-
-        ret = -ENOMEM;
-        if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
-            goto gethvmcontext_out;
-
-        v = d->vcpu[0];
-
-        ret = -ENODATA;
-        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
-            goto gethvmcontext_out;
-        
-        ret = 0;
-        if (arch_gethvm_ctxt(v, c) == -1)
-            ret = -EFAULT;
-
-#ifndef CONFIG_COMPAT
-        if ( copy_to_guest(op->u.hvmcontext.ctxt, c, 1) )
-            ret = -EFAULT;
-
-        xfree(c);
-#endif
-
-        if ( copy_to_guest(u_domctl, op, 1) )
-            ret = -EFAULT;
-
-    gethvmcontext_out:
-        put_domain(d);
-
-    }
-    break;
-
     case XEN_DOMCTL_getvcpuinfo:
     { 
         struct domain *d;

_______________________________________________
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] [XEN] Move hvm get/set domctl() commands to arch/x86/domctl.c., Xen patchbot-unstable <=