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

Re: [Xen-devel] Detecting PV drivers



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 05 April 2013 09:54
> To: Andrew Cooper; Jonathan Ludlam
> Cc: Paul Durrant; xen-devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] Detecting PV drivers
> 
> >>> On 04.04.13 at 19:00, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> wrote:
> > On 04/04/13 17:30, Jon Ludlam wrote:
> >> Hi,
> >>
> >> I'm trying find out the best way of detecting whether PV drivers have
> >> loaded in an HVM guest. For example, this is so we can decide whether or
> >> not to wait for a response from the guest when suspending.
> >>
> >> I think the best way of doing this is to find out whether the hypercall
> >> page has been populated or not, as this is the first thing that any PV
> >> drivers will have to do, but I don't know how to detect this, or even if
> >> this is possible - is there any way of finding this out?
> >
> > Not currently as far as I can tell, but intercepting
> > hvm_hypercall_page_initialise() and setting a boolean in struct domain
> > would be easy.
> 
> But that doesn't in any way mean PV drivers are present. We have
> a PV ticket lock implementation for HVM guests that necessarily also
> sets up the hypercall page, yet this is in no way connected to the
> presence of PV drivers.
> 
> > The better question would be how to get this information out of Xen.
> 
> And to me it's not obvious why looking at xenstore wouldn't be the
> right thing - any frontend in connected state would indicate presence
> of PV drivers, wouldn't it?
> 

I think the concern is that that might be too late. To get something into 
xenstore the PV drivers clearly must have initialized the store ring. So, if 
tools were to wait for something in xenstore they may well suspend a guest that 
had mapped the store ring, sent a write request, and was waiting for a response 
from xenstore. If the xenstore had not yet serviced that request and responded 
then, when the guest was resumed, it would wait forever for a response that 
would never come.

  Paul



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