From fb8c22b5606b2c3d0881df8df05ad1c909b247b2 Mon Sep 17 00:00:00 2001 Message-ID: From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 26 Feb 2025 19:10:42 +0000 Subject: [PATCH] libxl: support 'rawset' ACPI table type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes representation of the 'acpi_firmware' config in the Xen driver, which repesents a concatenation of tables of any type. Use of 'type=slic' is accepted on input for backwards compatibility. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé (cherry picked from commit dac6ecba6f75bff11fbddb2bce8ca9b576ea6a74) Resolves: https://issues.redhat.com/browse/RHEL-81041 --- docs/formatdomain.rst | 2 +- src/libxl/libxl_domain.c | 5 +++-- src/libxl/xen_xl.c | 2 +- tests/xlconfigdata/test-fullvirt-acpi-slic.xml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index ff06efb69f..b03b5317aa 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -492,7 +492,7 @@ These options apply to any form of booting of the guest OS. signature auto-detected from header (:since:`Since 11.2.0 (QEMU)`). * ``rawset``: concatenation of multiple ACPI tables with header and data, each with any ACPI signature, auto-detected from header - (:since:`Since 11.2.0`). + (:since:`Since 11.2.0 (Xen)`). * ``slic``: a single ACPI table with header and data, providing software licensing information. The ACPI table signature in the header will be forced to ``SLIC`` (:since:`Since 1.3.5 (QEMU)`, diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index e564d9e5fe..e31d92d903 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -333,11 +333,12 @@ libxlDomainDefValidate(const virDomainDef *def, for (i = 0; i < def->os.nacpiTables; i++) { switch (def->os.acpiTables[i]->type) { - case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC: + case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC: /* Back compat for historical mistake, + * functionally the same as 'rawset' */ + case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET: break; case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW: - case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("ACPI table type '%1$s' is not supported"), virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type)); diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index 062b753cea..9d06315661 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -140,7 +140,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps) def->os.nacpiTables = 1; def->os.acpiTables = g_new0(virDomainOSACPITableDef *, 1); def->os.acpiTables[0] = g_new0(virDomainOSACPITableDef, 1); - def->os.acpiTables[0]->type = VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC; + def->os.acpiTables[0]->type = VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET; def->os.acpiTables[0]->path = g_steal_pointer(&slic); } diff --git a/tests/xlconfigdata/test-fullvirt-acpi-slic.xml b/tests/xlconfigdata/test-fullvirt-acpi-slic.xml index 366d877624..bf617e5e05 100644 --- a/tests/xlconfigdata/test-fullvirt-acpi-slic.xml +++ b/tests/xlconfigdata/test-fullvirt-acpi-slic.xml @@ -8,7 +8,7 @@ hvm /usr/lib/xen/boot/hvmloader - /sys/firmware/acpi/tables/SLIC
+ /sys/firmware/acpi/tables/SLIC
-- 2.49.0