aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarian Postevca <posteuca@mutex.one>2021-02-21 02:17:36 +0200
committerMichael S. Tsirkin <mst@redhat.com>2021-03-22 18:58:19 -0400
commitd07b22863b8e0981bdc9384a787a703f1fd4ba42 (patch)
treec58dcec6e3517523f9084dd783389f2e4cd2f13d /include
parent50337286b796f3866d1880f6e8a895fa5853b543 (diff)
acpi: Move setters/getters of oem fields to X86MachineState
The code that sets/gets oem fields is duplicated in both PC and MICROVM variants. This commit moves it to X86MachineState so that all x86 variants can use it and duplication is removed. Signed-off-by: Marian Postevca <posteuca@mutex.one> Message-Id: <20210221001737.24499-2-posteuca@mutex.one> Reviewed-by: Igor Mammedov <imammedo@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/i386/microvm.h4
-rw-r--r--include/hw/i386/pc.h4
-rw-r--r--include/hw/i386/x86.h4
3 files changed, 4 insertions, 8 deletions
diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
index 372b05774e..f25f837441 100644
--- a/include/hw/i386/microvm.h
+++ b/include/hw/i386/microvm.h
@@ -76,8 +76,6 @@
#define MICROVM_MACHINE_ISA_SERIAL "isa-serial"
#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
-#define MICROVM_MACHINE_OEM_ID "oem-id"
-#define MICROVM_MACHINE_OEM_TABLE_ID "oem-table-id"
struct MicrovmMachineClass {
X86MachineClass parent;
@@ -106,8 +104,6 @@ struct MicrovmMachineState {
Notifier machine_done;
Notifier powerdown_req;
struct GPEXConfig gpex;
- char *oem_id;
- char *oem_table_id;
};
#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index d4c3d73c11..dcf060b791 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -46,8 +46,6 @@ typedef struct PCMachineState {
bool pit_enabled;
bool hpet_enabled;
uint64_t max_fw_size;
- char *oem_id;
- char *oem_table_id;
/* NUMA information: */
uint64_t numa_nodes;
@@ -65,8 +63,6 @@ typedef struct PCMachineState {
#define PC_MACHINE_SATA "sata"
#define PC_MACHINE_PIT "pit"
#define PC_MACHINE_MAX_FW_SIZE "max-fw-size"
-#define PC_MACHINE_OEM_ID "oem-id"
-#define PC_MACHINE_OEM_TABLE_ID "oem-table-id"
/**
* PCMachineClass:
*
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index 56080bd1fb..26c9cc45a4 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -67,6 +67,8 @@ struct X86MachineState {
OnOffAuto smm;
OnOffAuto acpi;
+ char *oem_id;
+ char *oem_table_id;
/*
* Address space used by IOAPIC device. All IOAPIC interrupts
* will be translated to MSI messages in the address space.
@@ -76,6 +78,8 @@ struct X86MachineState {
#define X86_MACHINE_SMM "smm"
#define X86_MACHINE_ACPI "acpi"
+#define X86_MACHINE_OEM_ID "oem-id"
+#define X86_MACHINE_OEM_TABLE_ID "oem-table-id"
#define TYPE_X86_MACHINE MACHINE_TYPE_NAME("x86")
OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)