From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 1/3] libxl: attach xen-pciback only to PV domains
Date: Tue, 18 Oct 2016 23:03:03 +0200 [thread overview]
Message-ID: <20161018210303.GE15776@mail-itl> (raw)
In-Reply-To: <20161018205228.GR30736@x230.dumpdata.com>
[-- Attachment #1.1: Type: text/plain, Size: 2227 bytes --]
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órecki wrote:
> > HVM domains use IOMMU and device model assistance for communicating with
> > 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.
>
> This has the consequence that the "reset" of the device that
> pciback does will no longer be done.
>
> 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órecki <marmarek@invisiblethingslab.com>
> > ---
> > tools/libxl/libxl_pci.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > 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:
> > }
> > }
> >
> > - if (!starting)
> > + if (!starting && !hvm)
> > rc = libxl__device_pci_add_xenstore(gc, domid, pcidev, starting);
> > else
> > rc = 0;
> > @@ -1306,7 +1306,8 @@ static void libxl__add_pcidevs(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
> > }
> > }
> >
> > - if (d_config->num_pcidevs > 0) {
> > + if (d_config->num_pcidevs > 0
> > + && d_config->c_info.type == LIBXL_DOMAIN_TYPE_PV) {
> > rc = libxl__create_pci_backend(gc, domid, d_config->pcidevs,
> > d_config->num_pcidevs);
> > if (rc < 0) {
> > --
> > 2.5.5
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > https://lists.xen.org/xen-devel
--
Best Regards,
Marek Marczykowski-Górecki
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?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-18 21:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 1:53 [PATCH 0/3] Fix PCI passthrough for HVM with stubdomain Marek Marczykowski-Górecki
2016-10-18 1:53 ` [PATCH 1/3] libxl: attach xen-pciback only to PV domains Marek Marczykowski-Górecki
2016-10-18 20:52 ` Konrad Rzeszutek Wilk
2016-10-18 21:03 ` Marek Marczykowski-Górecki [this message]
2016-10-19 9:37 ` Wei Liu
2016-10-19 20:46 ` Konrad Rzeszutek Wilk
2016-10-19 22:42 ` Marek Marczykowski-Górecki
2016-10-25 13:10 ` Konrad Rzeszutek Wilk
2016-10-25 19:22 ` Marek Marczykowski-Górecki
2016-10-25 19:42 ` Andrew Cooper
2016-10-18 1:53 ` [PATCH 2/3] libxl: attach PCI device to qemu only after setting pciback/pcifront Marek Marczykowski-Górecki
2016-10-19 9:37 ` Wei Liu
2016-10-18 1:53 ` [PATCH 3/3] libxl: don't try to manipulate json config for stubdomain Marek Marczykowski-Górecki
2016-10-19 9:38 ` Wei Liu
2016-10-19 10:32 ` Marek Marczykowski-Górecki
2016-10-18 18:44 ` [PATCH 0/3] Fix PCI passthrough for HVM with stubdomain Samuel Thibault
-- strict thread matches above, loose matches on Subject: below --
2016-10-18 23:07 [PATCH 1/3] libxl: attach xen-pciback only to PV domains Juergen Schinker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161018210303.GE15776@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=ian.jackson@eu.citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).