[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 23/81] acpi: fadt: support revision 6.0 of the ACPI specificati
From: |
Michael S. Tsirkin |
Subject: |
[PULL v3 23/81] acpi: fadt: support revision 6.0 of the ACPI specification |
Date: |
Sat, 5 Nov 2022 13:16:34 -0400 |
From: Miguel Luis <miguel.luis@oracle.com>
Update the Fixed ACPI Description Table (FADT) to revision 6.0 of the ACPI
specification adding the field "Hypervisor Vendor Identity".
This field's description states the following: "64-bit identifier of hypervisor
vendor. All bytes in this field are considered part of the vendor identity.
These identifiers are defined independently by the vendors themselves,
usually following the name of the hypervisor product. Version information
should NOT be included in this field - this shall simply denote the vendor's
name or identifier. Version information can be communicated through a
supplemental vendor-specific hypervisor API. Firmware implementers would
place zero bytes into this field, denoting that no hypervisor is present in
the actual firmware."
Signed-off-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20221011181730.10885-3-miguel.luis@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/aml-build.c | 13 ++++++++++---
hw/arm/virt-acpi-build.c | 10 +++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index e6bfac95c7..42feb4d4d7 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -2070,7 +2070,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker,
MachineState *ms,
acpi_table_end(linker, &table);
}
-/* build rev1/rev3/rev5.1 FADT */
+/* build rev1/rev3/rev5.1/rev6.0 FADT */
void build_fadt(GArray *tbl, BIOSLinker *linker, const AcpiFadtData *f,
const char *oem_id, const char *oem_table_id)
{
@@ -2193,8 +2193,15 @@ void build_fadt(GArray *tbl, BIOSLinker *linker, const
AcpiFadtData *f,
/* SLEEP_STATUS_REG */
build_append_gas_from_struct(tbl, &f->sleep_sts);
- /* TODO: extra fields need to be added to support revisions above rev5 */
- assert(f->rev == 5);
+ if (f->rev == 5) {
+ goto done;
+ }
+
+ /* Hypervisor Vendor Identity */
+ build_append_padded_str(tbl, "QEMU", 8, '\0');
+
+ /* TODO: extra fields need to be added to support revisions above rev6 */
+ assert(f->rev == 6);
done:
acpi_table_end(linker, &table);
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 13c6e3e468..e5377744f3 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -808,13 +808,13 @@ build_madt(GArray *table_data, BIOSLinker *linker,
VirtMachineState *vms)
}
/* FADT */
-static void build_fadt_rev5(GArray *table_data, BIOSLinker *linker,
+static void build_fadt_rev6(GArray *table_data, BIOSLinker *linker,
VirtMachineState *vms, unsigned dsdt_tbl_offset)
{
- /* ACPI v5.1 */
+ /* ACPI v6.0 */
AcpiFadtData fadt = {
- .rev = 5,
- .minor_ver = 1,
+ .rev = 6,
+ .minor_ver = 0,
.flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI,
.xdsdt_tbl_offset = &dsdt_tbl_offset,
};
@@ -944,7 +944,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables
*tables)
/* FADT MADT PPTT GTDT MCFG SPCR DBG2 pointed to by RSDT */
acpi_add_table(table_offsets, tables_blob);
- build_fadt_rev5(tables_blob, tables->linker, vms, dsdt);
+ build_fadt_rev6(tables_blob, tables->linker, vms, dsdt);
acpi_add_table(table_offsets, tables_blob);
build_madt(tables_blob, tables->linker, vms);
--
MST
- [PULL v3 13/81] acpi/tests/avocado/bits: add biosbits config file for running bios tests, (continued)
- [PULL v3 13/81] acpi/tests/avocado/bits: add biosbits config file for running bios tests, Michael S. Tsirkin, 2022/11/05
- [PULL v3 20/81] bios-tables-test: add test for number of cores > 255, Michael S. Tsirkin, 2022/11/05
- [PULL v3 26/81] hw/pci: PCIe Data Object Exchange emulation, Michael S. Tsirkin, 2022/11/05
- [PULL v3 16/81] MAINTAINERS: add myself as the maintainer for acpi biosbits avocado tests, Michael S. Tsirkin, 2022/11/05
- [PULL v3 30/81] hw/pci-bridge/cxl-upstream: Add a CDAT table access DOE, Michael S. Tsirkin, 2022/11/05
- [PULL v3 15/81] acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 14/81] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits, Michael S. Tsirkin, 2022/11/05
- [PULL v3 17/81] hw/smbios: add core_count2 to smbios table type 4, Michael S. Tsirkin, 2022/11/05
- [PULL v3 18/81] bios-tables-test: teach test to use smbios 3.0 tables, Michael S. Tsirkin, 2022/11/05
- [PULL v3 21/81] tests/acpi: update tables for new core count test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 23/81] acpi: fadt: support revision 6.0 of the ACPI specification,
Michael S. Tsirkin <=
- [PULL v3 29/81] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange, Michael S. Tsirkin, 2022/11/05
- [PULL v3 22/81] tests/acpi: virt: allow acpi MADT and FADT changes, Michael S. Tsirkin, 2022/11/05
- [PULL v3 38/81] vhost: expose vhost_virtqueue_start(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 55/81] acpi: enumerate SMB bridge automatically along with other PCI devices, Michael S. Tsirkin, 2022/11/05
- [PULL v3 58/81] acpi: pc/35: sanitize _GPE declaration order, Michael S. Tsirkin, 2022/11/05
- [PULL v3 19/81] tests/acpi: allow changes for core_count2 test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 24/81] acpi: arm/virt: madt: bump to revision 4 accordingly to ACPI 6.0 Errata A, Michael S. Tsirkin, 2022/11/05
- [PULL v3 27/81] hw/mem/cxl-type3: Add MSIX support, Michael S. Tsirkin, 2022/11/05
- [PULL v3 25/81] tests/acpi: virt: update ACPI MADT and FADT binaries, Michael S. Tsirkin, 2022/11/05
- [PULL v3 31/81] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus, Michael S. Tsirkin, 2022/11/05