[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 5/5] libxl: spawns two QEMUs for HVM guests



Stefano Stabellini writes ("Re: [PATCH v2 5/5] libxl: spawns two QEMUs for HVM 
guests"):
> On Mon, 8 Jun 2015, Ian Jackson wrote:
> > I think the right answer is probably to start all the qemus in
> > parallel, and count (or otherwise record) the spawn outcomes.
> 
> They are already started in parallel with this patch.
> Where should libxl_create.c:qdisk_spawn_outcome store the outcome?
> Somewhere in dcs->build_state? Who would check for that?

Each qemu already needs a record in the dcs, or hanging off it, for
the libxl__ev_child.  You can store the exit status (or an rc derived
from it) there.

The spawn_outcome function does something like this:

       int worst_rc = 0;

       libxl_report_child_exitstatus(...)
       dcs->qemus[myself]->rc = status ? ERROR_QEMU_DIED : 0;

       for (i=0; i<n_qemus; i++) {
          if (libxl__ev_child_inuse(&dcs->qemus[i].childw))
              return;
          if (dcs->qemus[i].rc IS WORSE THAN worst_rc)
              worst_rc = dcs->qemus[i].rc;
       }
       /* all qemus have completed */
       if (worst_rc)
           domcreate_complete(egc, dcs, worst_rc)
       else
          domain_create_do_next_thing(egc, dcs, ...);


Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.