mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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>
This commit is contained in:
parent
9d283f85d7
commit
17e89077b7
10 changed files with 78 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue