WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2/2] libxl: Multi-device passthrough coldplug: do

To: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/2] libxl: Multi-device passthrough coldplug: do not wait for unstarted guest
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 23 Feb 2011 16:25:47 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Feb 2011 08:26:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1298478078-20038-2-git-send-email-ian.jackson@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1298478078-20038-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1298478078-20038-2-git-send-email-ian.jackson@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 23 Feb 2011, Ian Jackson wrote:
> When doing a PCI passthrough, the code checks to see whether there is
> an existing backend directory in xenstore with a nonzero "num_devs".
> If there isn't, it creates the backend directory with just the
> required device.
> 
> If there is, it would assume that it was doing hotplug.  If doing
> hotplug, it needs to set the "state" node in xenstore to "7"
> (reconfiguring) and thus avoid racing with the backend needs to wait
> for the backend to be "4" (connected).
> 
> However during guest creation, the presence of "num_devs" doesn't
> necessarily mean hotplug.  If we are still creating the initial
> xenstore setup (ie, adding devices as a subroutine of domain
> creation), we can just write the new devices to xenstore.  So do that.
> 
> This involves adding a new parameter "starting", indicating that we
> are still in domain creation, to libxl_device_pci_add_xenstore (a
> misnamed internal function) and its callers.  Its callers include
> libxl_device_pci_add which we therefore split into an internal version
> with the new parameter, and an external version used only for hotplug
> by libxl-using applications.
> 


nice and simple 

Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel