All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3 6/6] ioreq-server: bring the PCI hotplug controller implementation into Xen
Date: Fri, 14 Mar 2014 14:06:46 -0400	[thread overview]
Message-ID: <20140314180646.GO30560@phenom.dumpdata.com> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD028874F@AMSPEX01CL01.citrite.net>

On Fri, Mar 14, 2014 at 03:18:12PM +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: Ian Campbell
> > Sent: 14 March 2014 15:02
> > To: Paul Durrant
> > Cc: xen-devel@lists.xen.org
> > Subject: Re: [Xen-devel] [PATCH v3 6/6] ioreq-server: bring the PCI hotplug
> > controller implementation into Xen
> > 
> > On Fri, 2014-03-14 at 14:31 +0000, Paul Durrant wrote:
> > > > -----Original Message-----
> > > > From: Ian Campbell
> > > > Sent: 14 March 2014 14:09
> > > > To: Paul Durrant
> > > > Cc: xen-devel@lists.xen.org
> > > > Subject: Re: [Xen-devel] [PATCH v3 6/6] ioreq-server: bring the PCI
> > hotplug
> > > > controller implementation into Xen
> > > >
> > > > On Fri, 2014-03-14 at 13:25 +0000, Paul Durrant wrote:
> > > > > > -----Original Message-----
> > > > > > From: Ian Campbell
> > > > > > Sent: 14 March 2014 11:58
> > > > > > To: Paul Durrant
> > > > > > Cc: xen-devel@lists.xen.org
> > > > > > Subject: Re: [Xen-devel] [PATCH v3 6/6] ioreq-server: bring the PCI
> > > > hotplug
> > > > > > controller implementation into Xen
> > > > > >
> > > > > > On Wed, 2014-03-05 at 14:48 +0000, Paul Durrant wrote:
> > > > > > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> > > > > > > index 2e52470..4176440 100644
> > > > > > > --- a/tools/libxl/libxl_pci.c
> > > > > > > +++ b/tools/libxl/libxl_pci.c
> > > > > > > @@ -867,6 +867,13 @@ static int do_pci_add(libxl__gc *gc, uint32_t
> > > > > > domid, libxl_device_pci *pcidev, i
> > > > > > >          }
> > > > > > >          if ( rc )
> > > > > > >              return ERROR_FAIL;
> > > > > > > +
> > > > > > > +        rc = xc_hvm_pci_hotplug_enable(ctx->xch, domid, pcidev-
> > >dev);
> > > > > > > +        if (rc < 0) {
> > > > > > > +            LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Error:
> > > > > > xc_hvm_pci_hotplug_enable failed");
> > > > > > > +            return ERROR_FAIL;
> > > > > > > +        }
> > > > > >
> > > > > > Perhaps I'm misreading this but does this imply that you cannot
> > hotplug
> > > > > > PCI devices into an HVM guest which wasn't started with a PCI
> > device?
> > > > > > That doesn't sound right/desirable.
> > > > > >
> > > > >
> > > > > I don't think that is the case. The extra code here is because we're
> > > > > intercepting the hotplug controller IO space in Xen so QEMU may well
> > > > > play with its hotplug controller device model, but the guest will
> > > > > never see it.
> > > >
> > > > That wasn't what I meant.
> > > >
> > > > Unless the guest has a PCI device enabled the above code will never be
> > > > called, so we will never setup the hotplug controller within Xen.
> > > >
> > >
> > > I don't follow. The hotplug controller is set up by the call to
> > > gpe_init() in hvm_domain_initialize(). The above code is there to tell
> > > the hotplug controller a new device has appeared. Am I missing
> > > something?
> > 
> > No, I was, didn't realise this was per-device setup.
> > 
> > I assume this is ok to call for both cold- and hotplug
> > 
> 
> I believe so. I've certainly seen no fallout in testing my new VGA device (which is cold plugged to a paused domain).
> 
> > > > > > Is there no problem with the availability of the i/o space for the
> > > > > > different versions of qemu (i.e. they are both the same today?) The
> > AML
> > > > > > looked like it poked a different thing in the trad case -- so is 0xae00
> > > > > > unused there?
> > > > > >
> > > > >
> > > > > QEMU will still emulate a PCI hotplug controller but the guest will no
> > > > > longer see it. In the case of upstream that io range is now handled by
> > > > > xen, so it really really can't get to it. If trad is used then the
> > > > > hotplug controller would still be visible if the guest talks to the
> > > > > old IO ranges, but since they are not specified in the ACPI table any
> > > > > more it shouldn’t have anything to do with them. If you think that's a
> > > > > problem then I could hook those IO ranges in Xen too and stop the IO
> > > > > getting through.
> > > >
> > > > What I meant was what if there was something else at 0xae00 on trad?
> > >
> > > I don't believe so.
> > >
> > > > (since trad seems to have its hotplug controller somewhere else this is
> > > > possible). That something will now be shadowed by the hotplug
> > controller
> > > > in Xen. If that something was important for some other reason this is a
> > > > problem. IOW is there a hole in the io port address map at this location
> > > > on both qemus?
> > > >
> > >
> > > The new implementation in Xen directly overlays the upstream QEMU
> > > controller.
> > 
> > I got this part.
> > 
> > >  I believe those IO ports are unimplemented by trad.
> > 
> > That's the important thing (although turning "believe" into "have
> > confirmed" would make me sleep easier).
> 
> Sure, I can check.

What about future version of QEMU? If they moved the addresses in the future
(or decided to expand the existing ones to do some extra stuff) - what is our
path to deal with this?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-03-14 18:06 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:47 [PATCH v3 0/6] Support for running secondary emulators Paul Durrant
2014-03-05 14:47 ` [PATCH v3 1/6] ioreq-server: centralize access to ioreq structures Paul Durrant
2014-03-05 14:47 ` [PATCH v3 2/6] ioreq-server: tidy up use of ioreq_t Paul Durrant
2014-03-10 15:43   ` George Dunlap
2014-03-10 15:46     ` Paul Durrant
2014-03-10 15:53       ` George Dunlap
2014-03-10 16:04         ` Paul Durrant
2014-03-10 16:56           ` George Dunlap
2014-03-11 10:06             ` Paul Durrant
2014-03-05 14:47 ` [PATCH v3 3/6] ioreq-server: create basic ioreq server abstraction Paul Durrant
2014-03-05 14:47 ` [PATCH v3 4/6] ioreq-server: on-demand creation of ioreq server Paul Durrant
2014-03-10 17:46   ` George Dunlap
2014-03-11 10:54     ` Paul Durrant
2014-03-14 11:04       ` Ian Campbell
2014-03-14 13:28         ` Paul Durrant
2014-03-14 11:18   ` Ian Campbell
2014-03-14 13:30     ` Paul Durrant
2014-03-05 14:48 ` [PATCH v3 5/6] ioreq-server: add support for multiple servers Paul Durrant
2014-03-14 11:52   ` Ian Campbell
2014-03-17 11:45     ` George Dunlap
2014-03-17 12:25     ` Paul Durrant
2014-03-17 12:35       ` Ian Campbell
2014-03-17 12:51         ` Paul Durrant
2014-03-17 12:53           ` Ian Campbell
2014-03-17 13:56             ` Paul Durrant
2014-03-17 14:44               ` Ian Campbell
2014-03-17 14:52                 ` Paul Durrant
2014-03-17 14:55                   ` Ian Campbell
2014-03-18 11:33                     ` Paul Durrant
2014-03-18 13:24                       ` George Dunlap
2014-03-18 13:38                         ` Paul Durrant
2014-03-18 13:45                         ` Paul Durrant
2014-03-20 11:11                   ` Tim Deegan
2014-03-20 11:22                     ` Paul Durrant
2014-03-20 12:10                       ` Paul Durrant
2014-03-05 14:48 ` [PATCH v3 6/6] ioreq-server: bring the PCI hotplug controller implementation into Xen Paul Durrant
2014-03-14 11:57   ` Ian Campbell
2014-03-14 13:25     ` Paul Durrant
2014-03-14 14:08       ` Ian Campbell
2014-03-14 14:31         ` Paul Durrant
2014-03-14 15:01           ` Ian Campbell
2014-03-14 15:18             ` Paul Durrant
2014-03-14 18:06               ` Konrad Rzeszutek Wilk [this message]
2014-03-17 11:13                 ` Paul Durrant
2014-03-10 18:57 ` [PATCH v3 0/6] Support for running secondary emulators George Dunlap
2014-03-11 10:48   ` Paul Durrant
2014-03-14 11:02 ` Ian Campbell
2014-03-14 13:26   ` Paul Durrant

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=20140314180646.GO30560@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Paul.Durrant@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.