diff options
author | Gerd Hoffmann | 2020-03-20 11:01:36 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2020-03-29 15:52:13 +0200 |
commit | 17e89077b7e3bc1d96540e21ddc7451c3e077049 (patch) | |
tree | 47310cda860c2d8308496883b98b7beba9847160 /hw/i386/pc.c | |
parent | fix vhost_user_blk_watch crash (diff) | |
download | qemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.tar.gz qemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.tar.xz qemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.zip |
acpi: add acpi=OnOffAuto machine property to x86 and arm virt
Remove the global acpi_enabled bool and replace it with an
acpi OnOffAuto machine property.
qemu throws an error now if you use -no-acpi while the machine
type you are using doesn't support acpi in the first place.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200320100136.11717-1-kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r-- | hw/i386/pc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 98ee763f68..0bf0aaca52 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1297,7 +1297,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, * but pcms->acpi_dev is still created. Check !acpi_enabled in * addition to cover this case. */ - if (!pcms->acpi_dev || !acpi_enabled) { + if (!pcms->acpi_dev || !x86_machine_is_acpi_enabled(X86_MACHINE(pcms))) { error_setg(errp, "memory hotplug is not enabled: missing acpi device or acpi disabled"); return; @@ -1351,7 +1351,7 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev, * but pcms->acpi_dev is still created. Check !acpi_enabled in * addition to cover this case. */ - if (!pcms->acpi_dev || !acpi_enabled) { + if (!pcms->acpi_dev || !x86_machine_is_acpi_enabled(X86_MACHINE(pcms))) { error_setg(&local_err, "memory hotplug is not enabled: missing acpi device or acpi disabled"); goto out; |