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.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
src/libxl/libxl_domain.c | 5 +++--
src/libxl/xen_xl.c | 2 +-
tests/xlconfigdata/test-fullvirt-acpi-slic.xml | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
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 @@
<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>
--
2.47.1