ia64/xen-unstable

changeset 18399:b4bde79b7ba0

libxc: Use vcpu_guest_context_any_t instead of two pages

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 27 16:23:10 2008 +0100 (2008-08-27)
parents 6c50c7d089d9
children ab50f558a6f3
files tools/libxc/xc_dom_boot.c
line diff
     1.1 --- a/tools/libxc/xc_dom_boot.c	Wed Aug 27 15:16:13 2008 +0100
     1.2 +++ b/tools/libxc/xc_dom_boot.c	Wed Aug 27 16:23:10 2008 +0100
     1.3 @@ -187,7 +187,7 @@ void *xc_dom_boot_domU_map(struct xc_dom
     1.4  int xc_dom_boot_image(struct xc_dom_image *dom)
     1.5  {
     1.6      DECLARE_DOMCTL;
     1.7 -    void *ctxt;
     1.8 +    vcpu_guest_context_any_t ctxt;
     1.9      int rc;
    1.10  
    1.11      xc_dom_printf("%s: called\n", __FUNCTION__);
    1.12 @@ -245,12 +245,11 @@ int xc_dom_boot_image(struct xc_dom_imag
    1.13          return rc;
    1.14  
    1.15      /* let the vm run */
    1.16 -    ctxt = xc_dom_malloc(dom, PAGE_SIZE * 2 /* FIXME */ );
    1.17 -    memset(ctxt, 0, PAGE_SIZE * 2);
    1.18 -    if ( (rc = dom->arch_hooks->vcpu(dom, ctxt)) != 0 )
    1.19 +    memset(&ctxt, 0, sizeof(ctxt));
    1.20 +    if ( (rc = dom->arch_hooks->vcpu(dom, &ctxt)) != 0 )
    1.21          return rc;
    1.22      xc_dom_unmap_all(dom);
    1.23 -    rc = launch_vm(dom->guest_xc, dom->guest_domid, ctxt);
    1.24 +    rc = launch_vm(dom->guest_xc, dom->guest_domid, &ctxt);
    1.25  
    1.26      return rc;
    1.27  }