ia64/xen-unstable

changeset 2611:e442cedb12d8

bitkeeper revision 1.1159.1.211 (4163fb35XBjUO8_fLeyomd3I9mHZOA)

Get rid of delay between finishing the transfer of a domain and when it gets to run.
author cl349@freefall.cl.cam.ac.uk
date Wed Oct 06 14:03:33 2004 +0000 (2004-10-06)
parents f57622168029
children 2859a2041ab0
files tools/libxc/xc_linux_restore.c tools/xfrd/xen_domain.c tools/xfrd/xfrd.c
line diff
     1.1 --- a/tools/libxc/xc_linux_restore.c	Wed Oct 06 13:26:03 2004 +0000
     1.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Oct 06 14:03:33 2004 +0000
     1.3 @@ -689,8 +689,19 @@ int xc_linux_restore(int xc_handle, XcIO
     1.4      op.u.builddomain.ctxt = &ctxt;
     1.5      rc = do_dom0_op(xc_handle, &op);
     1.6  
     1.7 -    /* don't start the domain as we have console etc to set up */
     1.8 -  
     1.9 +    if ( rc != 0 )
    1.10 +    {
    1.11 +        xcio_error(ioctxt, "Couldn't build the domain");
    1.12 +        goto out;
    1.13 +    }
    1.14 +
    1.15 +    if ( ioctxt->flags & XCFLAGS_CONFIGURE )
    1.16 +    {
    1.17 +        op.cmd = DOM0_UNPAUSEDOMAIN;
    1.18 +        op.u.unpausedomain.domain = (domid_t)dom;
    1.19 +        rc = do_dom0_op(xc_handle, &op);
    1.20 +    }
    1.21 +
    1.22      if ( rc == 0 )
    1.23      {
    1.24          /* Success: print the domain id. */
     2.1 --- a/tools/xfrd/xen_domain.c	Wed Oct 06 13:26:03 2004 +0000
     2.2 +++ b/tools/xfrd/xen_domain.c	Wed Oct 06 14:03:33 2004 +0000
     2.3 @@ -138,9 +138,8 @@ int xen_domain_rcv(IOStream *io,
     2.4      ioctxt->info = iostdout;
     2.5      ioctxt->err = iostderr;
     2.6      ioctxt->configure = domain_configure;
     2.7 -    if(!configured){
     2.8 +    if ( !*configured )
     2.9          ioctxt->flags |= XCFLAGS_CONFIGURE;
    2.10 -    }
    2.11  
    2.12      err = xc_linux_restore(xcinit(), ioctxt);
    2.13      *dom = ioctxt->domain;
     3.1 --- a/tools/xfrd/xfrd.c	Wed Oct 06 13:26:03 2004 +0000
     3.2 +++ b/tools/xfrd/xfrd.c	Wed Oct 06 14:03:33 2004 +0000
     3.3 @@ -863,9 +863,9 @@ int xfr_recv(Args *args, XfrState *state
     3.4          dprintf("> Configuring...\n");
     3.5          err = xen_domain_configure(state->vmid_new, state->vmconfig, state->vmconfig_n);
     3.6          if(err) goto exit;
     3.7 +        err = xen_domain_unpause(state->vmid_new);
     3.8 +        if(err) goto exit;
     3.9      }
    3.10 -    err = xen_domain_unpause(state->vmid_new);
    3.11 -    if(err) goto exit;
    3.12      // Report new domain id to peer.
    3.13      err = xfr_send_xfr_ok(peer, state->vmid_new);
    3.14      if(err) goto exit;