aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-03-20 11:01:36 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-03-29 09:52:13 -0400
commit17e89077b7e3bc1d96540e21ddc7451c3e077049 (patch)
tree47310cda860c2d8308496883b98b7beba9847160 /include
parent9d283f85d755285bf1b1bfcb1ab275239dbf2c7b (diff)
downloadqemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.zip
qemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.tar.gz
qemu-17e89077b7e3bc1d96540e21ddc7451c3e077049.tar.bz2
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 'include')
-rw-r--r--include/hw/acpi/acpi.h1
-rw-r--r--include/hw/arm/virt.h2
-rw-r--r--include/hw/i386/x86.h3
3 files changed, 5 insertions, 1 deletions
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index 1f2dafb..4bef575 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -181,7 +181,6 @@ void acpi_send_gpe_event(ACPIREGS *ar, qemu_irq irq,
void acpi_update_sci(ACPIREGS *acpi_regs, qemu_irq irq);
/* acpi.c */
-extern int acpi_enabled;
extern char unsigned *acpi_tables;
extern size_t acpi_tables_len;
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 893796d..60b2f52 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -131,6 +131,7 @@ typedef struct {
bool highmem_ecam;
bool its;
bool virt;
+ OnOffAuto acpi;
VirtGICType gic_version;
VirtIOMMUType iommu;
uint16_t virtio_iommu_bdf;
@@ -163,6 +164,7 @@ typedef struct {
OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_VIRT_MACHINE)
void virt_acpi_setup(VirtMachineState *vms);
+bool virt_is_acpi_enabled(VirtMachineState *vms);
/* Return the number of used redistributor regions */
static inline int virt_gicv3_redist_region_count(VirtMachineState *vms)
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index 22babcb..54af8ab 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -64,6 +64,7 @@ typedef struct {
unsigned smp_dies;
OnOffAuto smm;
+ OnOffAuto acpi;
/*
* Address space used by IOAPIC device. All IOAPIC interrupts
@@ -74,6 +75,7 @@ typedef struct {
#define X86_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g"
#define X86_MACHINE_SMM "smm"
+#define X86_MACHINE_ACPI "acpi"
#define TYPE_X86_MACHINE MACHINE_TYPE_NAME("x86")
#define X86_MACHINE(obj) \
@@ -104,6 +106,7 @@ void x86_load_linux(X86MachineState *x86ms,
bool linuxboot_dma_enabled);
bool x86_machine_is_smm_enabled(X86MachineState *x86ms);
+bool x86_machine_is_acpi_enabled(X86MachineState *x86ms);
/* Global System Interrupts */