]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: support 'rawset' ACPI table type
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 26 Feb 2025 19:10:42 +0000 (19:10 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 7 Mar 2025 13:00:10 +0000 (13:00 +0000)
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 <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
docs/formatdomain.rst
src/libxl/libxl_domain.c
src/libxl/xen_xl.c
tests/xlconfigdata/test-fullvirt-acpi-slic.xml

index c108cc0c2a58afb907c55d63588eb4363fa2dcfd..7e0bab5444f0d667e9715e2bf1ba7c55b0364347 100644 (file)
@@ -498,7 +498,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)`,
index ddfbe9b2ea80cbe5077a2a45166878f1354d70b5..06265cb1c031875194771ce2ac5578e234ee93ed 100644 (file)
@@ -331,11 +331,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));
index 96b8b0511c516ff2b5b59f09d4d4a54ffe9b095f..ec8de30c018c2e719d8533152086a38bd82ede2b 100644 (file)
@@ -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);
         }
 
index 366d87762414f60ea7d13e79a7e11eada73f1a08..bf617e5e057231f5726f037c0f3b6d9323c34618 100644 (file)
@@ -8,7 +8,7 @@
     <type arch='x86_64' machine='xenfv'>hvm</type>
     <loader type='rom' format='raw'>/usr/lib/xen/boot/hvmloader</loader>
     <acpi>
-      <table type='slic'>/sys/firmware/acpi/tables/SLIC</table>
+      <table type='rawset'>/sys/firmware/acpi/tables/SLIC</table>
     </acpi>
     <boot dev='cdrom'/>
   </os>