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-devel

[Xen-devel] [PATCH] libxc: Use vcpu_guest_context_any_t instead of two p

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Wed, 27 Aug 2008 12:38:39 +0100
Delivery-date: Wed, 27 Aug 2008 04:39:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
libxc: Use vcpu_guest_context_any_t instead of two pages

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 14a9a1629590 tools/libxc/xc_dom_boot.c
--- a/tools/libxc/xc_dom_boot.c wed aug 27 10:26:50 2008 +0100
+++ b/tools/libxc/xc_dom_boot.c wed aug 27 12:07:28 2008 +0100
@@ -187,7 +187,7 @@ int xc_dom_boot_image(struct xc_dom_imag
 int xc_dom_boot_image(struct xc_dom_image *dom)
 {
     declare_domctl;
-    void *ctxt;
+    vcpu_guest_context_any_t ctxt;
     int rc;
 
     xc_dom_printf("%s: called\n", __function__);
@@ -245,12 +245,11 @@ int xc_dom_boot_image(struct xc_dom_imag
         return rc;
 
     /* let the vm run */
-    ctxt = xc_dom_malloc(dom, page_size * 2 /* fixme */ );
-    memset(ctxt, 0, page_size * 2);
-    if ( (rc = dom->arch_hooks->vcpu(dom, ctxt)) != 0 )
+    memset(&ctxt, 0, sizeof(ctxt));
+    if ( (rc = dom->arch_hooks->vcpu(dom, &ctxt)) != 0 )
         return rc;
     xc_dom_unmap_all(dom);
-    rc = launch_vm(dom->guest_xc, dom->guest_domid, ctxt);
+    rc = launch_vm(dom->guest_xc, dom->guest_domid, &ctxt);
 
     return rc;
 }

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

<Prev in Thread] Current Thread [Next in Thread>