The MSDM ACPI table is a replacement for the SLIC table type, now preferred by Microsoft for Windows Licensing checks: https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85) Resolves: https://gitlab.com/libvirt/libvirt/-/issues/748 Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- src/qemu/qemu_command.c | 3 +- src/qemu/qemu_validate.c | 8 +--- .../acpi-table-many.x86_64-latest.args | 34 ++++++++++++++++ .../acpi-table-many.x86_64-latest.xml | 39 +++++++++++++++++++ tests/qemuxmlconfdata/acpi-table-many.xml | 31 +++++++++++++++ tests/qemuxmlconftest.c | 1 + 6 files changed, 108 insertions(+), 8 deletions(-) create mode 100644 tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/acpi-table-many.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1153d8e095..485b82f853 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -130,7 +130,8 @@ VIR_ENUM_IMPL(qemuNumaPolicy, VIR_ENUM_DECL(qemuACPITableSIG); VIR_ENUM_IMPL(qemuACPITableSIG, VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST, - "SLIC"); + "SLIC", + "MSDM"); const char * diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 0b3efcd700..42f9b14f25 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -745,14 +745,8 @@ qemuValidateDomainDefBoot(const virDomainDef *def, for (i = 0; i < def->os.nacpiTables; i++) { switch ((virDomainOsACPITable)def->os.acpiTables[i]->type) { case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC: - break; - case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("ACPI table '%1$s' not supported"), - virDomainOsACPITableTypeToString( - def->os.acpiTables[i]->type)); - return -1; + break; default: case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST: diff --git a/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.args b/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.args new file mode 100644 index 0000000000..a4d4f4b53d --- /dev/null +++ b/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-acpitable sig=SLIC,file=/var/lib/libvirt/acpi/slic.dat \ +-acpitable sig=MSDM,file=/var/lib/libvirt/acpi/msdm.dat \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.xml b/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.xml new file mode 100644 index 0000000000..7d42e377c9 --- /dev/null +++ b/tests/qemuxmlconfdata/acpi-table-many.x86_64-latest.xml @@ -0,0 +1,39 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <acpi> + <table type='slic'>/var/lib/libvirt/acpi/slic.dat</table> + <table type='msdm'>/var/lib/libvirt/acpi/msdm.dat</table> + </acpi> + <boot dev='hd'/> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/acpi-table-many.xml b/tests/qemuxmlconfdata/acpi-table-many.xml new file mode 100644 index 0000000000..710f3131e1 --- /dev/null +++ b/tests/qemuxmlconfdata/acpi-table-many.xml @@ -0,0 +1,31 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + <acpi> + <table type='slic'>/var/lib/libvirt/acpi/slic.dat</table> + <table type='msdm'>/var/lib/libvirt/acpi/msdm.dat</table> + </acpi> + </os> + <features> + <acpi/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index c271170d25..9af0dfc3e9 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -2774,6 +2774,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-too-long-port-path-invalid"); DO_TEST_CAPS_LATEST("acpi-table"); + DO_TEST_CAPS_LATEST("acpi-table-many"); DO_TEST_CAPS_LATEST("intel-iommu"); DO_TEST_CAPS_LATEST("intel-iommu-caching-mode"); -- 2.47.1