From: Igor Mammedov <imammedo@redhat.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Bruce Rogers <brogers@suse.com>,
qemu-devel@nongnu.org, mst@redhat.com, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ACPI: don't call acpi_pcihp_device_plug_cb on xen
Date: Fri, 28 Apr 2017 10:32:02 +0200 [thread overview]
Message-ID: <20170428103202.658f9f26@nial.brq.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1704271403550.2895@sstabellini-ThinkPad-X260>
On Thu, 27 Apr 2017 14:09:11 -0700 (PDT)
Stefano Stabellini <sstabellini@kernel.org> wrote:
> On Thu, 27 Apr 2017, Bruce Rogers wrote:
> > Commit f0c9d64a exposed the issue that with a xenfv machine using
> > pci passthrough, acpi cpi hotplug code was being executed by mistake.
> > Guard calls to acpi_pcihp_device_plug_cb (and corresponding
> > acpi_pcihp_device_unplug_cb) with a check for xen_enabled(). Without
> > this check I am seeing an error that the bus doesn't have the
> > acpi-pcihp-bsel property set.
> >
> > Signed-off-by: Bruce Rogers <brogers@suse.com>
> > ---
> > hw/acpi/piix4.c | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> > index a553a7e..c409374 100644
> > --- a/hw/acpi/piix4.c
> > +++ b/hw/acpi/piix4.c
> > @@ -385,7 +385,10 @@ static void piix4_device_plug_cb(HotplugHandler *hotplug_dev,
> > dev, errp);
> > }
> > } else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
> > - acpi_pcihp_device_plug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev, errp);
> > + if (!xen_enabled()) {
> > + acpi_pcihp_device_plug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
> > + errp);
> > + }
> > } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
> > if (s->cpu_hotplug_legacy) {
> > legacy_acpi_cpu_plug_cb(hotplug_dev, &s->gpe_cpu, dev, errp);
> > @@ -408,8 +411,10 @@ static void piix4_device_unplug_request_cb(HotplugHandler *hotplug_dev,
> > acpi_memory_unplug_request_cb(hotplug_dev, &s->acpi_memory_hotplug,
> > dev, errp);
> > } else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
> > - acpi_pcihp_device_unplug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
> > - errp);
> > + if (!xen_enabled()) {
> > + acpi_pcihp_device_unplug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
> > + errp);
> > + }
> > } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
> > !s->cpu_hotplug_legacy) {
> > acpi_cpu_unplug_request_cb(hotplug_dev, &s->cpuhp_state, dev, errp);
>
> Wouldn't it be better to simply turn the error_setg("Unsupported bus...)
> in acpi_pcihp_device_plug_cb and acpi_pcihp_device_unplug_cb into debug
> printfs? After all, from this description it is clear that they are not
> an error conditions. PCI Passthough works correctly, right?
it's error condition if acpi hotplug is in use, so we should keep it
next prev parent reply other threads:[~2017-04-28 8:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 19:59 [Qemu-devel] [PATCH] ACPI: don't call acpi_pcihp_device_plug_cb on xen Bruce Rogers
2017-04-27 21:09 ` Stefano Stabellini
2017-04-27 21:36 ` Bruce Rogers
2017-04-27 22:27 ` Stefano Stabellini
2017-04-28 8:32 ` Igor Mammedov [this message]
2017-04-28 8:38 ` Igor Mammedov
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=20170428103202.658f9f26@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=brogers@suse.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=sstabellini@kernel.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).