From: Wei Liu Subject: Re: [PATCH] libxl: Don't insert PCI device into xenstore for HVM guests Date: Fri, 29 May 2015 10:41:46 +0100 Message-ID: <20150529094146.GT30474@zion.uk.xensource.com> References: <1432886385-20313-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1432886385-20313-1-git-send-email-ross.lagerwall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall , Konrad Rzeszutek Wilk Cc: Ian Jackson , Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, May 29, 2015 at 08:59:45AM +0100, Ross Lagerwall wrote: > When doing passthrough of a PCI device for an HVM guest, don't insert > the device into xenstore, otherwise pciback attempts to use it which > conflicts with QEMU. > > This manifests itself such that the first time a device is passed to a > domain, it succeeds. Subsequent attempts fail unless the device is > unbound from pciback or the machine rebooted. > The commit message looks sensible to me. However this might break qemu-trad PCI passthrough if I'm not mistaken. What QEMU version are you using? Upstream or trad? Have you tested both of them? Wei. > Signed-off-by: Ross Lagerwall > --- > tools/libxl/libxl_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c > index e0743f8..2552889 100644 > --- a/tools/libxl/libxl_pci.c > +++ b/tools/libxl/libxl_pci.c > @@ -994,7 +994,7 @@ out: > } > } > > - if (!starting) > + if (!starting && type == LIBXL_DOMAIN_TYPE_PV) > rc = libxl__device_pci_add_xenstore(gc, domid, pcidev, starting); > else > rc = 0; > -- > 2.1.0