summaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2016-11-01 17:44:16 +0000
committerStefano Stabellini <sstabellini@kernel.org>2016-11-02 12:26:12 -0700
commit021746c131cdfeab9d82ff918795a9f18d20d7ae (patch)
tree1c214de35643642fee2682fc697060f2ec9796d1 /hw/i386
parentb5863634181a655bd2201cf51a363ac94a43f145 (diff)
PCMachineState: introduce acpi_build_enabled field
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator. It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/acpi-build.c2
-rw-r--r--hw/i386/pc.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 5cd1da9a87..13cbbde712 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2953,7 +2953,7 @@ void acpi_setup(void)
return;
}
- if (!pcmc->has_acpi_build) {
+ if (!pcms->acpi_build_enabled) {
ACPI_BUILD_DPRINTF("ACPI build disabled. Bailing out.\n");
return;
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f56ea0f87b..fbd9aed72b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj)
pcms->vmport = ON_OFF_AUTO_AUTO;
/* nvdimm is disabled on default. */
pcms->acpi_nvdimm_state.is_enabled = false;
+ /* acpi build is enabled by default if machine supports it */
+ pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
}
static void pc_machine_reset(void)