From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: [PATCH 1/3] libxl: attach xen-pciback only to PV domains Date: Tue, 18 Oct 2016 23:03:03 +0200 Message-ID: <20161018210303.GE15776@mail-itl> References: <1476755613-3921-1-git-send-email-marmarek@invisiblethingslab.com> <1476755613-3921-2-git-send-email-marmarek@invisiblethingslab.com> <20161018205228.GR30736@x230.dumpdata.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4255742409717378478==" Return-path: In-Reply-To: <20161018205228.GR30736@x230.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Konrad Rzeszutek Wilk Cc: Ian Jackson , Wei Liu , Samuel Thibault , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============4255742409717378478== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c4jr9uOfj6q35Id2" Content-Disposition: inline --c4jr9uOfj6q35Id2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 18, 2016 at 04:52:29PM -0400, Konrad Rzeszutek Wilk wrote: > On Tue, Oct 18, 2016 at 03:53:31AM +0200, Marek Marczykowski-G=C3=B3reck= i wrote: > > HVM domains use IOMMU and device model assistance for communicating wi= th > > PCI devices, xen-pcifront/pciback is used only in PV domains. > > When HVM domain has device model in stubdomain, attaching xen-pciback = to > > the target domain itself is not only useless, but also may prevent > > attaching xen-pciback to the stubdomain, effectively breaking PCI > > passthrough. >=20 > This has the consequence that the "reset" of the device that > pciback does will no longer be done. >=20 > That is the FLR functionality will not be exercised anymore. Are you sure about that? libxl__device_pci_add calls libxl__device_pci_reset, regardless of my patch. > > Signed-off-by: Marek Marczykowski-G=C3=B3recki > > --- > > tools/libxl/libxl_pci.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > >=20 > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c > > index 6f8f49c..2ae1bc4 100644 > > --- a/tools/libxl/libxl_pci.c > > +++ b/tools/libxl/libxl_pci.c > > @@ -1111,7 +1111,7 @@ out: > > } > > } > > =20 > > - if (!starting) > > + if (!starting && !hvm) > > rc =3D libxl__device_pci_add_xenstore(gc, domid, pcidev, star= ting); > > else > > rc =3D 0; > > @@ -1306,7 +1306,8 @@ static void libxl__add_pcidevs(libxl__egc *egc, = libxl__ao *ao, uint32_t domid, > > } > > } > > =20 > > - if (d_config->num_pcidevs > 0) { > > + if (d_config->num_pcidevs > 0 > > + && d_config->c_info.type =3D=3D LIBXL_DOMAIN_TYPE_PV) { > > rc =3D libxl__create_pci_backend(gc, domid, d_config->pcidevs= , > > d_config->num_pcidevs); > > if (rc < 0) { > > --=20 > > 2.5.5 > >=20 > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > https://lists.xen.org/xen-devel --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --c4jr9uOfj6q35Id2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJYBo4GAAoJENuP0xzK19csKVQIAIRRvQlHNeU+yHWUNoyr+9sE 88+L64XSRGy/MME/s4yIzxDDSk9BRarPTqPGUsyeimJOC0o2BpepT/Qj/aitM7Oq eC6ZF6N/IpSd8MM4RG7WX2+DggYNnkTraohD6Zw6FeufQRQnkA012IJ0kHdRzfYw jpRkniZ/ayXPTQ1eqU6uu7oBO3dl1pwOIrxWD5NsMF+qntl4JuadjSqwTUGZ5rnn eRanwnmP2eIx614ccP9mPhEGgIM+ibedYfcR4+JBrlFjxH0/dYVFBROJmaIteNJI VjKtnkbS5A4x7n57qzPzztQtH/X8CcB+9t1VvpKhMR7dncfEWRPAPIaG9I/WMI4= =ch1H -----END PGP SIGNATURE----- --c4jr9uOfj6q35Id2-- --===============4255742409717378478== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============4255742409717378478==--