From bfde8a471a604ddc3bfe7ee5baddbedc379ddf34 Mon Sep 17 00:00:00 2001 Message-ID: From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 17 Feb 2025 16:58:27 +0000 Subject: [PATCH] conf: support MSDM ACPI table type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MSDM ACPI table is an alternative for the SLIC table type, sometimes used by Microsoft for Windows Licensing checks: https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85) Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé (cherry picked from commit 32765cd14e99411dfd14a230be86f2aecf7e9a7a) Resolves: https://issues.redhat.com/browse/RHEL-81041 --- docs/formatdomain.rst | 4 ++++ src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/libxl/libxl_domain.c | 1 + src/qemu/qemu_command.c | 3 ++- src/qemu/qemu_validate.c | 1 + 7 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index b03b5317aa..c144851b62 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -497,6 +497,10 @@ These options apply to any form of booting of the guest OS. software licensing information. The ACPI table signature in the header will be forced to ``SLIC`` (:since:`Since 1.3.5 (QEMU)`, mis-interpreted as ``rawset`` :since:`Since 5.9.0 (Xen)`). + * ``msdm``: a single ACPI table with header and data, providing + Microsoft Data Management information. The ACPI table signature + in the header will be forced to ``MSDM`` + (:since:`Since 11.2.0`). Each type may be used only once, except for ``raw`` which can appear multiple times. diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2ee0403c86..f6d3d849eb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1461,6 +1461,7 @@ VIR_ENUM_IMPL(virDomainOsACPITable, "raw", "rawset", "slic", + "msdm", ); VIR_ENUM_IMPL(virDomainCFPC, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index bc3f42888e..961b7b056c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2466,6 +2466,7 @@ typedef enum { VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW, VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET, VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC, + VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM, VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST } virDomainOsACPITable; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 99bcc90d4f..d46eb44588 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -7192,6 +7192,7 @@ raw rawset slic + msdm diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index e31d92d903..c5a556ec78 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -339,6 +339,7 @@ libxlDomainDefValidate(const virDomainDef *def, break; case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW: + case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("ACPI table type '%1$s' is not supported"), virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type)); diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index adf7b21b14..9fe191d3b9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -132,7 +132,8 @@ VIR_ENUM_IMPL(qemuACPITableSIG, VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST, "", /* raw */ "", /* rawset */ - "SLIC"); + "SLIC", + ""); const char * diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index b088e54dd0..378f502ea7 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -734,6 +734,7 @@ qemuValidateDomainDefBoot(const virDomainDef *def, break; case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET: + case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("ACPI table type '%1$s' is not supported"), virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type)); -- 2.49.0