qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Bruce Rogers <brogers@suse.com>
Cc: sstabellini@kernel.org, qemu-devel@nongnu.org,
	qemu-stable@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] ACPI: call acpi_set_pci_info when only acpi enabled
Date: Thu, 27 Apr 2017 18:08:32 +0200	[thread overview]
Message-ID: <20170427180832.55eed506@Igors-MacBook-Pro.local> (raw)
In-Reply-To: <590211DF02000048001438FF@prv-mh.provo.novell.com>

On Thu, 27 Apr 2017 09:44:31 -0600
"Bruce Rogers" <brogers@suse.com> wrote:

> >>> On 4/27/2017 at 03:11 AM, Igor Mammedov <imammedo@redhat.com> wrote: 
> > On Wed, 26 Apr 2017 13:07:02 -0600
> > Bruce Rogers <brogers@suse.com> wrote:
> > 
> >> Commit f0c9d64a exposed an issue with the code order in acpi_setup.
> >> As of that commit, a xenfv machine type guest will no longer start
> >> if using pci passthrough. Re-order the code in that function to
> >> allow acpi_set_pci_info to be called before bailing on the other,
> >> non-related conditions. With this change I can again use pci
> >> passthrough and xenfv together.
> >> 
> >> Signed-off-by: Bruce Rogers <brogers@suse.com>
> > it doesn't look right,
> > acpi_set_pci_info() is supposed to affect only ACPI based hotplug
> > 
> > could you elaborate more on what's going on and
> > what error you see at startup?
> 
> I am using libvirt, driving the creation of the Xen HVM guest via
> libxl. libxl dynamically attaches the pci device via QMP. In the
> context of qmp_device_add(), we get a failure in hw/acpi/pcihp.c:
> acpi_pcihp_device_plug_cb() when it checks for bsel, and errors
> with the message: "Unsupported bus. Bus doesn't have property
> 'acpi-pcihp-bsel' set". I guess it wasn't clear from my description
> that hotplug was involved.
> 
is dev->hotplugged in acpi_pcihp_device_plug_cb() true at that time?

the point is that bsel is needed only when there is supporting ACPI code
and useless otherwise, so acpi_pcihp_device_plug_cb() probably shouldn't
run under xenfv. I'd try to add compat prop to PIIX4_PM and disable
acpi_pcihp_device_plug_cb() for xenfv via machine compat property.

> Bruce
> 
> > 
> >> ---
> >>  hw/i386/acpi-build.c | 14 +++++++-------
> >>  1 file changed, 7 insertions(+), 7 deletions(-)
> >> 
> >> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> >> index 2073108..1ec072f 100644
> >> --- a/hw/i386/acpi-build.c
> >> +++ b/hw/i386/acpi-build.c
> >> @@ -2834,6 +2834,13 @@ void acpi_setup(void)
> >>      AcpiBuildState *build_state;
> >>      Object *vmgenid_dev;
> >>  
> >> +    if (!acpi_enabled) {
> >> +        ACPI_BUILD_DPRINTF("ACPI disabled. Bailing out.\n");
> >> +        return;
> >> +    }
> >> +
> >> +    acpi_set_pci_info();
> >> +
> >>      if (!pcms->fw_cfg) {
> >>          ACPI_BUILD_DPRINTF("No fw cfg. Bailing out.\n");
> >>          return;
> >> @@ -2844,15 +2851,8 @@ void acpi_setup(void)
> >>          return;
> >>      }
> >>  
> >> -    if (!acpi_enabled) {
> >> -        ACPI_BUILD_DPRINTF("ACPI disabled. Bailing out.\n");
> >> -        return;
> >> -    }
> >> -
> >>      build_state = g_malloc0(sizeof *build_state);
> >>  
> >> -    acpi_set_pci_info();
> >> -
> >>      acpi_build_tables_init(&tables);
> >>      acpi_build(&tables, MACHINE(pcms));
> >>  
> 
> 

  reply	other threads:[~2017-04-27 16:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 19:07 [Qemu-devel] [PATCH] ACPI: call acpi_set_pci_info when only acpi enabled Bruce Rogers
2017-04-27  9:11 ` Igor Mammedov
2017-04-27 15:44   ` Bruce Rogers
2017-04-27 16:08     ` Igor Mammedov [this message]
2017-04-27 16:29       ` Bruce Rogers
2017-04-27 16:51       ` Bruce Rogers
2017-04-27 17:35         ` Igor Mammedov
2017-04-27 18:08           ` Stefano Stabellini
2017-04-27 19:57             ` Bruce Rogers

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=20170427180832.55eed506@Igors-MacBook-Pro.local \
    --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).