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

Re: [Xen-devel] [PATCH v3 4/5] libxl: check for dynamic device model start required




>>> On 3/25/2016 at 02:25 PM, in message <56F4D9D6.8030300@xxxxxxxx>, Juergen 
>>> Gross
<jgross@xxxxxxxx> wrote: 
> On 25/03/16 03:06, Chun Yan Liu wrote: 
> >  
> >  
> >>>> On 3/23/2016 at 08:24 PM, in message 
> > <1458735847-9448-5-git-send-email-jgross@xxxxxxxx>, Juergen Gross 
> > <jgross@xxxxxxxx> wrote:  
> >> Add a service routine checking whether a device model must be started  
> >> after adding a device to a domain.  
> >>   
> >> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>  
> >> ---  
> >>  tools/libxl/libxl.c          | 12 ++++++++++++  
> >>  tools/libxl/libxl_dm.c       | 14 ++++++++++++++  
> >>  tools/libxl/libxl_internal.h |  4 ++++  
> >>  tools/libxl/libxl_pci.c      |  3 +++  
> >>  tools/libxl/libxl_pvusb.c    |  6 ++++++  
> >>  5 files changed, 39 insertions(+)  
> >>   
> >> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c  
> >> index dcd0951..2b4e36f 100644  
> >> --- a/tools/libxl/libxl.c  
> >> +++ b/tools/libxl/libxl.c  
> >> @@ -2084,6 +2084,9 @@ void libxl__device_vtpm_add(libxl__egc *egc, 
> >> uint32_t  
>   
> >> domid,  
> >>          if (rc) goto out;  
> >>    
> >>          DEVICE_ADD(vtpm, vtpms, domid, &vtpm_saved, COMPARE_DEVID,   
> >> &d_config);  
> >> +  
> >> +        rc = libxl__dm_check_start(gc, &d_config, domid);  
> >> +        if (rc) goto out;  
> >>      } 
> >  
> > Why is this check put inside the if (aodev->update_json) {  }? I think it's 
> >  
> a common 
> > check, so should move outside. 
>  
> It is the only case where the check makes sense: update_json isn't set 
> when we are just creating the domain, in which case the test for the 
> device model needed is already in place.

See. That's OK then.

Thanks,
Chunyan
 
> When the device is added to an 
> already running domain update_json will always be true. 
>  
>  
> Juergen 
>  



_______________________________________________
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®.