aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/acpi-microvm.c
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 /hw/i386/acpi-microvm.c
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 'hw/i386/acpi-microvm.c')
-rw-r--r--hw/i386/acpi-microvm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index 271710eb92..ccd3303aac 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -149,7 +149,7 @@ build_dsdt_microvm(GArray *table_data, BIOSLinker *linker,
g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
build_header(linker, table_data,
(void *)(table_data->data + table_data->len - dsdt->buf->len),
- "DSDT", dsdt->buf->len, 2, mms->oem_id, mms->oem_table_id);
+ "DSDT", dsdt->buf->len, 2, x86ms->oem_id, x86ms->oem_table_id);
free_aml_allocator();
}
@@ -201,24 +201,24 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
pmfadt.dsdt_tbl_offset = &dsdt;
pmfadt.xdsdt_tbl_offset = &dsdt;
acpi_add_table(table_offsets, tables_blob);
- build_fadt(tables_blob, tables->linker, &pmfadt, mms->oem_id,
- mms->oem_table_id);
+ build_fadt(tables_blob, tables->linker, &pmfadt, x86ms->oem_id,
+ x86ms->oem_table_id);
acpi_add_table(table_offsets, tables_blob);
acpi_build_madt(tables_blob, tables->linker, X86_MACHINE(machine),
- ACPI_DEVICE_IF(x86ms->acpi_dev), mms->oem_id,
- mms->oem_table_id);
+ ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
+ x86ms->oem_table_id);
xsdt = tables_blob->len;
- build_xsdt(tables_blob, tables->linker, table_offsets, mms->oem_id,
- mms->oem_table_id);
+ build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id,
+ x86ms->oem_table_id);
/* RSDP is in FSEG memory, so allocate it separately */
{
AcpiRsdpData rsdp_data = {
/* ACPI 2.0: 5.2.4.3 RSDP Structure */
.revision = 2, /* xsdt needs v2 */
- .oem_id = mms->oem_id,
+ .oem_id = x86ms->oem_id,
.xsdt_tbl_offset = &xsdt,
.rsdt_tbl_offset = NULL,
};