diff mbox series

[v4,2/2] acpi: i386: Move VMBus DSDT entry to SB

Message ID 20200625045011.1075314-3-arilou@gmail.com
State New
Headers show
Series hyperv: vmbus: ACPI various corrections | expand

Commit Message

Jon Doron June 25, 2020, 4:50 a.m. UTC
Signed-off-by: Jon Doron <arilou@gmail.com>
---
 hw/i386/acpi-build.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Igor Mammedov July 13, 2020, 8:38 a.m. UTC | #1
On Thu, 25 Jun 2020 07:50:11 +0300
Jon Doron <arilou@gmail.com> wrote:

> Signed-off-by: Jon Doron <arilou@gmail.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  hw/i386/acpi-build.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 91af0d2d0d..1f938a53b2 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1091,7 +1091,6 @@ static Aml *build_vmbus_device_aml(VMBusBridge *vmbus_bridge)
>  static void build_isa_devices_aml(Aml *table)
>  {
>      ISADevice *fdc = pc_find_fdc0();
> -    VMBusBridge *vmbus_bridge = vmbus_bridge_find();
>      bool ambiguous;
>  
>      Aml *scope = aml_scope("_SB.PCI0.ISA");
> @@ -1112,10 +1111,6 @@ static void build_isa_devices_aml(Aml *table)
>          isa_build_aml(ISA_BUS(obj), scope);
>      }
>  
> -    if (vmbus_bridge) {
> -        aml_append(scope, build_vmbus_device_aml(vmbus_bridge));
> -    }
> -
>      aml_append(table, scope);
>  }
>  
> @@ -1660,6 +1655,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>      PCIBus *bus = NULL;
>      TPMIf *tpm = tpm_find();
>      int i;
> +    VMBusBridge *vmbus_bridge = vmbus_bridge_find();
>  
>      dsdt = init_aml_allocator();
>  
> @@ -1702,6 +1698,12 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>          }
>      }
>  
> +    if (vmbus_bridge) {
> +        sb_scope = aml_scope("_SB");
> +        aml_append(sb_scope, build_vmbus_device_aml(vmbus_bridge));
> +        aml_append(dsdt, sb_scope);
> +    }
> +
>      if (pcmc->legacy_cpu_hotplug) {
>          build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
>      } else {
diff mbox series

Patch

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 91af0d2d0d..1f938a53b2 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1091,7 +1091,6 @@  static Aml *build_vmbus_device_aml(VMBusBridge *vmbus_bridge)
 static void build_isa_devices_aml(Aml *table)
 {
     ISADevice *fdc = pc_find_fdc0();
-    VMBusBridge *vmbus_bridge = vmbus_bridge_find();
     bool ambiguous;
 
     Aml *scope = aml_scope("_SB.PCI0.ISA");
@@ -1112,10 +1111,6 @@  static void build_isa_devices_aml(Aml *table)
         isa_build_aml(ISA_BUS(obj), scope);
     }
 
-    if (vmbus_bridge) {
-        aml_append(scope, build_vmbus_device_aml(vmbus_bridge));
-    }
-
     aml_append(table, scope);
 }
 
@@ -1660,6 +1655,7 @@  build_dsdt(GArray *table_data, BIOSLinker *linker,
     PCIBus *bus = NULL;
     TPMIf *tpm = tpm_find();
     int i;
+    VMBusBridge *vmbus_bridge = vmbus_bridge_find();
 
     dsdt = init_aml_allocator();
 
@@ -1702,6 +1698,12 @@  build_dsdt(GArray *table_data, BIOSLinker *linker,
         }
     }
 
+    if (vmbus_bridge) {
+        sb_scope = aml_scope("_SB");
+        aml_append(sb_scope, build_vmbus_device_aml(vmbus_bridge));
+        aml_append(dsdt, sb_scope);
+    }
+
     if (pcmc->legacy_cpu_hotplug) {
         build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
     } else {