6ae9ed
From b330f5cda86acf70de78d103a7ed5a0e0e3cbacb Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <b330f5cda86acf70de78d103a7ed5a0e0e3cbacb@dist-git>
6ae9ed
From: Michal Privoznik <mprivozn@redhat.com>
6ae9ed
Date: Fri, 5 Aug 2016 14:35:25 +0200
6ae9ed
Subject: [PATCH] Introduce SMM feature
6ae9ed
6ae9ed
https://bugzilla.redhat.com/show_bug.cgi?id=1304483
6ae9ed
6ae9ed
Since its release of 2.4.0 qemu is able to enable System
6ae9ed
Management Module in the firmware, or disable it. We should
6ae9ed
expose this capability in the XML. Unfortunately, there's no good
6ae9ed
way to determine whether the binary we are talking to supports
6ae9ed
it. I mean, if qemu's run with real machine type, the smm
6ae9ed
attribute can be seen in 'qom-list /machine' output. But it's not
6ae9ed
there when qemu's run with -M none. Therefore we're stuck with
6ae9ed
version based check.
6ae9ed
6ae9ed
Also, for the RHEL-7.3 I had to adjust the machine-smm-opt test.
6ae9ed
In the upstream we already retired QEMU_CAPS_SMP_TOPOLOGY
6ae9ed
capability, but not in RHEL yet.
6ae9ed
6ae9ed
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6ae9ed
(cherry picked from commit d0e4be9d0297494ba0e23843593f734234ddb08f)
6ae9ed
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6ae9ed
6ae9ed
 Conflicts:
6ae9ed
   tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
6ae9ed
   tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
6ae9ed
   tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml -
6ae9ed
   QEMU_CAPS_DISPLAY is not backported yet
6ae9ed
6ae9ed
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6ae9ed
---
6ae9ed
 docs/formatdomain.html.in                          |  6 +++++
6ae9ed
 docs/schemas/domaincommon.rng                      |  9 +++++++
6ae9ed
 src/conf/domain_conf.c                             |  5 +++-
6ae9ed
 src/conf/domain_conf.h                             |  1 +
6ae9ed
 src/qemu/qemu_capabilities.c                       | 16 +++++++++++++
6ae9ed
 src/qemu/qemu_capabilities.h                       |  4 ++++
6ae9ed
 src/qemu/qemu_command.c                            | 12 ++++++++++
6ae9ed
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |  1 +
6ae9ed
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |  1 +
6ae9ed
 .../caps_2.6.0-gicv2.aarch64.xml                   |  1 +
6ae9ed
 .../caps_2.6.0-gicv3.aarch64.xml                   |  1 +
6ae9ed
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |  1 +
6ae9ed
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |  1 +
6ae9ed
 .../qemuxml2argv-machine-smm-opt.args              | 25 +++++++++++++++++++
6ae9ed
 .../qemuxml2argv-machine-smm-opt.xml               | 28 ++++++++++++++++++++++
6ae9ed
 tests/qemuxml2argvtest.c                           |  8 +++++++
6ae9ed
 16 files changed, 119 insertions(+), 1 deletion(-)
6ae9ed
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.args
6ae9ed
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.xml
6ae9ed
6ae9ed
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
6ae9ed
index f006179..4d4d601 100644
6ae9ed
--- a/docs/formatdomain.html.in
6ae9ed
+++ b/docs/formatdomain.html.in
6ae9ed
@@ -1655,6 +1655,12 @@
6ae9ed
           values are 2, 3 and host.
6ae9ed
           Since 1.2.16
6ae9ed
       
6ae9ed
+      
smm
6ae9ed
+      
Enable System Management Mode. Possible values are
6ae9ed
+          on and off. The default is left
6ae9ed
+          for hypervisor to decide.
6ae9ed
+          Since 2.1.0
6ae9ed
+      
6ae9ed
     
6ae9ed
 
6ae9ed
     

Time keeping

6ae9ed
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
6ae9ed
index f17104b..3960a98 100644
6ae9ed
--- a/docs/schemas/domaincommon.rng
6ae9ed
+++ b/docs/schemas/domaincommon.rng
6ae9ed
@@ -4286,6 +4286,15 @@
6ae9ed
               </optional>
6ae9ed
             </element>
6ae9ed
           </optional>
6ae9ed
+          <optional>
6ae9ed
+            <element name="smm">
6ae9ed
+              <optional>
6ae9ed
+                <attribute name="state">
6ae9ed
+                  <ref name="virOnOff"/>
6ae9ed
+                </attribute>
6ae9ed
+              </optional>
6ae9ed
+            </element>
6ae9ed
+          </optional>
6ae9ed
         </interleave>
6ae9ed
       </element>
6ae9ed
     </optional>
6ae9ed
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
6ae9ed
index abf889a..c02c821 100644
6ae9ed
--- a/src/conf/domain_conf.c
6ae9ed
+++ b/src/conf/domain_conf.c
6ae9ed
@@ -137,7 +137,8 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
6ae9ed
               "capabilities",
6ae9ed
               "pmu",
6ae9ed
               "vmport",
6ae9ed
-              "gic")
6ae9ed
+              "gic",
6ae9ed
+              "smm")
6ae9ed
 
6ae9ed
 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
6ae9ed
               "default",
6ae9ed
@@ -16361,6 +16362,7 @@ virDomainDefParseXML(xmlDocPtr xml,
6ae9ed
         case VIR_DOMAIN_FEATURE_PMU:
6ae9ed
         case VIR_DOMAIN_FEATURE_PVSPINLOCK:
6ae9ed
         case VIR_DOMAIN_FEATURE_VMPORT:
6ae9ed
+        case VIR_DOMAIN_FEATURE_SMM:
6ae9ed
             node = ctxt->node;
6ae9ed
             ctxt->node = nodes[i];
6ae9ed
             if ((tmp = virXPathString("string(./@state)", ctxt))) {
6ae9ed
@@ -23265,6 +23267,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
6ae9ed
             case VIR_DOMAIN_FEATURE_PMU:
6ae9ed
             case VIR_DOMAIN_FEATURE_PVSPINLOCK:
6ae9ed
             case VIR_DOMAIN_FEATURE_VMPORT:
6ae9ed
+            case VIR_DOMAIN_FEATURE_SMM:
6ae9ed
                 switch ((virTristateSwitch) def->features[i]) {
6ae9ed
                 case VIR_TRISTATE_SWITCH_LAST:
6ae9ed
                 case VIR_TRISTATE_SWITCH_ABSENT:
6ae9ed
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
6ae9ed
index 1f75be1..88b0122 100644
6ae9ed
--- a/src/conf/domain_conf.h
6ae9ed
+++ b/src/conf/domain_conf.h
6ae9ed
@@ -1598,6 +1598,7 @@ typedef enum {
6ae9ed
     VIR_DOMAIN_FEATURE_PMU,
6ae9ed
     VIR_DOMAIN_FEATURE_VMPORT,
6ae9ed
     VIR_DOMAIN_FEATURE_GIC,
6ae9ed
+    VIR_DOMAIN_FEATURE_SMM,
6ae9ed
 
6ae9ed
     VIR_DOMAIN_FEATURE_LAST
6ae9ed
 } virDomainFeature;
6ae9ed
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
6ae9ed
index b35948d..d3964bd 100644
6ae9ed
--- a/src/qemu/qemu_capabilities.c
6ae9ed
+++ b/src/qemu/qemu_capabilities.c
6ae9ed
@@ -338,6 +338,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
6ae9ed
 
6ae9ed
               "tls-creds-x509", /* 230 */
6ae9ed
               "intel-iommu",
6ae9ed
+              "smm",
6ae9ed
     );
6ae9ed
 
6ae9ed
 
6ae9ed
@@ -3538,6 +3539,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
6ae9ed
     if (qemuCaps->version >= 2003000)
6ae9ed
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOSTUSER_MULTIQUEUE);
6ae9ed
 
6ae9ed
+    /* smm option is supported from v2.4.0 */
6ae9ed
+    if (qemuCaps->version >= 2004000)
6ae9ed
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_SMM_OPT);
6ae9ed
+
6ae9ed
     /* Since 2.4.50 ARM virt machine supports gic-version option */
6ae9ed
     if (qemuCaps->version >= 2004050)
6ae9ed
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION);
6ae9ed
@@ -4057,6 +4062,17 @@ virQEMUCapsSupportsVmport(virQEMUCapsPtr qemuCaps,
6ae9ed
 
6ae9ed
 
6ae9ed
 bool
6ae9ed
+virQEMUCapsSupportsSMM(virQEMUCapsPtr qemuCaps,
6ae9ed
+                       const virDomainDef *def)
6ae9ed
+{
6ae9ed
+    if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_SMM_OPT))
6ae9ed
+        return false;
6ae9ed
+
6ae9ed
+    return qemuDomainMachineIsQ35(def);
6ae9ed
+}
6ae9ed
+
6ae9ed
+
6ae9ed
+bool
6ae9ed
 virQEMUCapsIsMachineSupported(virQEMUCapsPtr qemuCaps,
6ae9ed
                               const char *canonical_machine)
6ae9ed
 {
6ae9ed
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
6ae9ed
index 379aff0..150d619 100644
6ae9ed
--- a/src/qemu/qemu_capabilities.h
6ae9ed
+++ b/src/qemu/qemu_capabilities.h
6ae9ed
@@ -371,6 +371,7 @@ typedef enum {
6ae9ed
     /* 230 */
6ae9ed
     QEMU_CAPS_OBJECT_TLS_CREDS_X509, /* -object tls-creds-x509 */
6ae9ed
     QEMU_CAPS_DEVICE_INTEL_IOMMU, /* -device intel-iommu */
6ae9ed
+    QEMU_CAPS_MACHINE_SMM_OPT, /* -machine xxx,smm=on/off/auto */
6ae9ed
 
6ae9ed
     QEMU_CAPS_LAST /* this must always be the last item */
6ae9ed
 } virQEMUCapsFlags;
6ae9ed
@@ -407,6 +408,9 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
6ae9ed
 bool virQEMUCapsSupportsVmport(virQEMUCapsPtr qemuCaps,
6ae9ed
                                const virDomainDef *def);
6ae9ed
 
6ae9ed
+bool virQEMUCapsSupportsSMM(virQEMUCapsPtr qemuCaps,
6ae9ed
+                            const virDomainDef *def);
6ae9ed
+
6ae9ed
 char *virQEMUCapsFlagsString(virQEMUCapsPtr qemuCaps);
6ae9ed
 
6ae9ed
 const char *virQEMUCapsGetBinary(virQEMUCapsPtr qemuCaps);
6ae9ed
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
6ae9ed
index 1a5c6dc..773f5f3 100644
6ae9ed
--- a/src/qemu/qemu_command.c
6ae9ed
+++ b/src/qemu/qemu_command.c
6ae9ed
@@ -6996,6 +6996,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
6ae9ed
         }
6ae9ed
     } else {
6ae9ed
         virTristateSwitch vmport = def->features[VIR_DOMAIN_FEATURE_VMPORT];
6ae9ed
+        virTristateSwitch smm = def->features[VIR_DOMAIN_FEATURE_SMM];
6ae9ed
 
6ae9ed
         virCommandAddArg(cmd, "-machine");
6ae9ed
         virBufferAdd(&buf, def->os.machine, -1);
6ae9ed
@@ -7025,6 +7026,17 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
6ae9ed
                               virTristateSwitchTypeToString(vmport));
6ae9ed
         }
6ae9ed
 
6ae9ed
+        if (smm) {
6ae9ed
+            if (!virQEMUCapsSupportsSMM(qemuCaps, def)) {
6ae9ed
+                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
6ae9ed
+                               _("smm is not available with this QEMU binary"));
6ae9ed
+                goto cleanup;
6ae9ed
+            }
6ae9ed
+
6ae9ed
+            virBufferAsprintf(&buf, ",smm=%s",
6ae9ed
+                              virTristateSwitchTypeToString(smm));
6ae9ed
+        }
6ae9ed
+
6ae9ed
         if (def->mem.dump_core) {
6ae9ed
             if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
6ae9ed
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
6ae9ed
index 98c260c..225019a 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
6ae9ed
@@ -183,6 +183,7 @@
6ae9ed
   <flag name='spice-unix'/>
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='intel-iommu'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2004000</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
6ae9ed
index 590c8c1..f16f057 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
6ae9ed
@@ -188,6 +188,7 @@
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
   <flag name='intel-iommu'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2005000</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
6ae9ed
index aa65733..c57f11f 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
6ae9ed
@@ -157,6 +157,7 @@
6ae9ed
   <flag name='name-guest'/>
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2005094</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
6ae9ed
index 04d77f7..9798323 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
6ae9ed
@@ -157,6 +157,7 @@
6ae9ed
   <flag name='name-guest'/>
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2005094</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
6ae9ed
index 120d249..7392551 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
6ae9ed
@@ -151,6 +151,7 @@
6ae9ed
   <flag name='name-guest'/>
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2005094</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
6ae9ed
index 128ac11..766c514 100644
6ae9ed
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
6ae9ed
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
6ae9ed
@@ -194,6 +194,7 @@
6ae9ed
   <flag name='drive-detect-zeroes'/>
6ae9ed
   <flag name='tls-creds-x509'/>
6ae9ed
   <flag name='intel-iommu'/>
6ae9ed
+  <flag name='smm'/>
6ae9ed
   <version>2006000</version>
6ae9ed
   <kvmVersion>0</kvmVersion>
6ae9ed
   <package></package>
6ae9ed
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.args
6ae9ed
new file mode 100644
6ae9ed
index 0000000..e49d7e9
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.args
6ae9ed
@@ -0,0 +1,25 @@
6ae9ed
+LC_ALL=C \
6ae9ed
+PATH=/bin \
6ae9ed
+HOME=/home/test \
6ae9ed
+USER=test \
6ae9ed
+LOGNAME=test \
6ae9ed
+QEMU_AUDIO_DRV=none \
6ae9ed
+/usr/bin/qemu \
6ae9ed
+-name QEMUGuest1 \
6ae9ed
+-S \
6ae9ed
+-machine q35,accel=tcg,smm=on \
6ae9ed
+-m 214 \
6ae9ed
+-smp 1,sockets=1,cores=1,threads=1 \
6ae9ed
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
6ae9ed
+-nographic \
6ae9ed
+-nodefaults \
6ae9ed
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
6ae9ed
+-no-acpi \
6ae9ed
+-boot c \
6ae9ed
+-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
6ae9ed
+-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
6ae9ed
+-device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x1 \
6ae9ed
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-0-0 \
6ae9ed
+-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
6ae9ed
+drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \
6ae9ed
+-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x2
6ae9ed
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.xml
6ae9ed
new file mode 100644
6ae9ed
index 0000000..b964b5e
6ae9ed
--- /dev/null
6ae9ed
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-smm-opt.xml
6ae9ed
@@ -0,0 +1,28 @@
6ae9ed
+<domain type='qemu'>
6ae9ed
+  <name>QEMUGuest1</name>
6ae9ed
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
6ae9ed
+  <memory unit='KiB'>219100</memory>
6ae9ed
+  <currentMemory unit='KiB'>219100</currentMemory>
6ae9ed
+  <vcpu placement='static'>1</vcpu>
6ae9ed
+  <os>
6ae9ed
+    <type arch='x86_64' machine='q35'>hvm</type>
6ae9ed
+    <boot dev='hd'/>
6ae9ed
+  </os>
6ae9ed
+  <features>
6ae9ed
+    <smm state='on'/>
6ae9ed
+  </features>
6ae9ed
+  <clock offset='utc'/>
6ae9ed
+  <on_poweroff>destroy</on_poweroff>
6ae9ed
+  <on_reboot>restart</on_reboot>
6ae9ed
+  <on_crash>destroy</on_crash>
6ae9ed
+  <devices>
6ae9ed
+    <emulator>/usr/bin/qemu</emulator>
6ae9ed
+    <disk type='block' device='disk'>
6ae9ed
+      <source dev='/dev/HostVG/QEMUGuest1'/>
6ae9ed
+      <target dev='sda' bus='scsi'/>
6ae9ed
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
6ae9ed
+    </disk>
6ae9ed
+    <controller type='scsi' index='0'/>
6ae9ed
+    <memballoon model='virtio'/>
6ae9ed
+  </devices>
6ae9ed
+</domain>
6ae9ed
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
6ae9ed
index f49f9b9..5c26812 100644
6ae9ed
--- a/tests/qemuxml2argvtest.c
6ae9ed
+++ b/tests/qemuxml2argvtest.c
6ae9ed
@@ -617,6 +617,14 @@ mymain(void)
6ae9ed
             QEMU_CAPS_DUMP_GUEST_CORE);
6ae9ed
     DO_TEST_FAILURE("machine-core-on", NONE);
6ae9ed
     DO_TEST_FAILURE("machine-core-on", QEMU_CAPS_MACHINE_OPT);
6ae9ed
+    DO_TEST("machine-smm-opt",
6ae9ed
+            QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
6ae9ed
+            QEMU_CAPS_DEVICE_PCI_BRIDGE,
6ae9ed
+            QEMU_CAPS_ICH9_AHCI,
6ae9ed
+            QEMU_CAPS_MACHINE_OPT,
6ae9ed
+            QEMU_CAPS_MACHINE_SMM_OPT,
6ae9ed
+            QEMU_CAPS_SMP_TOPOLOGY,
6ae9ed
+            QEMU_CAPS_VIRTIO_SCSI);
6ae9ed
     DO_TEST("machine-usb-opt", QEMU_CAPS_MACHINE_OPT,
6ae9ed
             QEMU_CAPS_MACHINE_USB_OPT);
6ae9ed
     DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_OPT,
6ae9ed
-- 
6ae9ed
2.9.2
6ae9ed