From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 3/3] libxl: don't try to manipulate json config for stubdomain
Date: Wed, 19 Oct 2016 12:32:59 +0200 [thread overview]
Message-ID: <20161019103259.GC559@mail-itl> (raw)
In-Reply-To: <20161019093804.GG2639@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2157 bytes --]
On Wed, Oct 19, 2016 at 10:38:04AM +0100, Wei Liu wrote:
> On Tue, Oct 18, 2016 at 03:53:33AM +0200, Marek Marczykowski-Górecki wrote:
> > Stubdomain do not have it's own config file - its configuration is
> > derived from target domains. Do not try to manipulate it when attaching
> > PCI device.
> >
> > This bug prevented starting HVM with stubdomain and PCI passthrough
> > device attached.
> >
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > ---
> > tools/libxl/libxl_pci.c | 24 +++++++++++++++---------
> > 1 file changed, 15 insertions(+), 9 deletions(-)
> >
> > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> > index 3805d30..5ad70c5 100644
> > --- a/tools/libxl/libxl_pci.c
> > +++ b/tools/libxl/libxl_pci.c
> > @@ -151,14 +151,18 @@ static int libxl__device_pci_add_xenstore(libxl__gc *gc, uint32_t domid, libxl_d
> > GCNEW(device);
> > libxl__device_from_pcidev(gc, domid, pcidev, device);
> >
> > - lock = libxl__lock_domain_userdata(gc, domid);
> > - if (!lock) {
> > - rc = ERROR_LOCK_FAIL;
> > - goto out;
> > - }
> > + /* Stubdomain config is derived from its target domain, it doesn't have
> > + its own file */
> > + if (!libxl_is_stubdom(CTX, domid, NULL)) {
> > + lock = libxl__lock_domain_userdata(gc, domid);
> > + if (!lock) {
> > + rc = ERROR_LOCK_FAIL;
> > + goto out;
> > + }
> >
>
> What makes PCI devices special with regard to other devices? In other
> words, do we need to make similar changes to other devices as well?
I think PCI is special because libxl doesn't bother to update stubdomain
configuration for other device types at all... If I try dynamic
attach of network device to a HVM (with stubdomain), it gets attached
_only_ to the target domain. So HVM without any PV drivers is out of
luck. Is it supposed to work with qemu in dom0?
--
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-19 10:32 UTC|newest]
Thread overview: 16+ 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
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 [this message]
2016-10-18 18:44 ` [PATCH 0/3] Fix PCI passthrough for HVM with stubdomain Samuel Thibault
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=20161019103259.GC559@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=ian.jackson@eu.citrix.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).