[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info wh
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed |
Date: |
Fri, 11 Aug 2017 20:18:28 +0300 |
On Fri, Aug 11, 2017 at 04:11:37PM +0100, Anthony PERARD wrote:
> To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be
> set, but this was done only when ACPI tables are built which is not
> needed for a Xen guest. The need for the property starts with commit
> "pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice"
> (f0c9d64a68b776374ec4732424a3e27753ce37b6).
>
> Set pci info before checking for the needs to build ACPI tables.
>
> Reported-by: Sander Eikelenboom <address@hidden>
> Tested-by: Sander Eikelenboom <address@hidden>
> Signed-off-by: Anthony PERARD <address@hidden>
I am worried that Xen will come to depend on specific
assignment of bsel which isn't guaranteed. Thoughts on
how to avoid that?
>
> ---
> In this patch rather than always calling acpi_set_pci_info() when
> acpi_setup() is called, we could check first for acpi_enabled? (which is
> true for Xen.)
Yes, please change it like this. Also, please add
a comment explainging what it does.
Thanks!
>
> This patch would be a canditade to backport to 2.9.
>
> CC: Stefano Stabellini <address@hidden>
> CC: Bruce Rogers <address@hidden>
> ---
> hw/i386/acpi-build.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 98dd424678..e1b7797408 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -2871,6 +2871,8 @@ void acpi_setup(void)
> AcpiBuildState *build_state;
> Object *vmgenid_dev;
>
> + acpi_set_pci_info();
> +
> if (!pcms->fw_cfg) {
> ACPI_BUILD_DPRINTF("No fw cfg. Bailing out.\n");
> return;
> @@ -2888,8 +2890,6 @@ void acpi_setup(void)
>
> build_state = g_malloc0(sizeof *build_state);
>
> - acpi_set_pci_info();
> -
> acpi_build_tables_init(&tables);
> acpi_build(&tables, MACHINE(pcms));
>
> --
> Anthony PERARD
[Qemu-devel] [PATCH for-2.10 2/2] Revert "ACPI: don't call acpi_pcihp_device_plug_cb on xen", Anthony PERARD, 2017/08/11