All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages
@ 2008-08-27 11:38 Samuel Thibault
  2008-08-27 13:58 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2008-08-27 11:38 UTC (permalink / raw)
  To: xen-devel

libxc: Use vcpu_guest_context_any_t instead of two pages

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

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;
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages
  2008-08-27 11:38 [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages Samuel Thibault
@ 2008-08-27 13:58 ` Keir Fraser
  2008-08-27 14:45   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2008-08-27 13:58 UTC (permalink / raw)
  To: Samuel Thibault, xen-devel

This patch doesn't apply. You must have other patches layered underneath it.

 -- Keir

On 27/8/08 12:38, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:

> libxc: Use vcpu_guest_context_any_t instead of two pages
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
> 
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages
  2008-08-27 13:58 ` Keir Fraser
@ 2008-08-27 14:45   ` Samuel Thibault
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2008-08-27 14:45 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

Keir Fraser, le Wed 27 Aug 2008 14:58:57 +0100, a écrit :
> This patch doesn't apply. You must have other patches layered underneath it.

Oops sorry, actually I had just mistakenly lowered all cases in the
patch (powerful editors...)




libxc: Use vcpu_guest_context_any_t instead of two pages

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

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;
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-27 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27 11:38 [PATCH] libxc: Use vcpu_guest_context_any_t instead of two pages Samuel Thibault
2008-08-27 13:58 ` Keir Fraser
2008-08-27 14:45   ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.