qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Bruce Rogers <brogers@suse.com>
Cc: qemu-devel@nongnu.org, sstabellini@kernel.org,
	qemu-stable@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] ACPI: don't call acpi_pcihp_device_plug_cb on xen
Date: Fri, 28 Apr 2017 10:38:26 +0200	[thread overview]
Message-ID: <20170428103826.676072ba@nial.brq.redhat.com> (raw)
In-Reply-To: <1493323148-32461-1-git-send-email-brogers@suse.com>

On Thu, 27 Apr 2017 13:59:08 -0600
Bruce Rogers <brogers@suse.com> wrote:

> Commit f0c9d64a exposed the issue that with a xenfv machine using
> pci passthrough, acpi cpi hotplug code was being executed by mistake.
s/cpi/pci/

> 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.
it would be better to put actual error here.

> 
> Signed-off-by: Bruce Rogers <brogers@suse.com>
with above fixed up

Reviewed-by: Igor Mammedov <imammedo@redhat.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);

      parent reply	other threads:[~2017-04-28  8:38 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
2017-04-28  8:38 ` Igor Mammedov [this message]

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=20170428103826.676072ba@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).