]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: format SLIC ACPI table command line
authorJán Tomko <jtomko@redhat.com>
Thu, 12 May 2016 11:21:01 +0000 (13:21 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 25 May 2016 15:15:21 +0000 (17:15 +0200)
<os>
  <acpi>
    <table type="slic">/path/to/acpi/table/file</table>
  </acpi>
</os>

will result in:

-acpitable sig=SLIC,file=/path/to/acpi/table/file

This option was introduced by QEMU commit 8a92ea2 in 2009.

https://bugzilla.redhat.com/show_bug.cgi?id=1327537

src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args [new file with mode: 0644]
tests/qemuxml2argvtest.c

index 102837bafbfe8ec8f1e2c3919ff51e873d860674..368bd871f7e3180f05ad59c180b560a726cbff5b 100644 (file)
@@ -6222,6 +6222,13 @@ qemuBuildBootCommandLine(virCommandPtr cmd,
             goto error;
         }
     }
+    if (def->os.slic_table) {
+        virBuffer buf = VIR_BUFFER_INITIALIZER;
+        virCommandAddArg(cmd, "-acpitable");
+        virBufferAddLit(&buf, "sig=SLIC,file=");
+        qemuBufferEscapeComma(&buf, def->os.slic_table);
+        virCommandAddArgBuffer(cmd, &buf);
+    }
 
     return 0;
 
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args b/tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args
new file mode 100644 (file)
index 0000000..31902ba
--- /dev/null
@@ -0,0 +1,19 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-boot c \
+-acpitable sig=SLIC,file=/var/lib/libvirt/acpi/slic.dat \
+-usb
index 7bf93005f225e44af2a9960355f722b6387a7460..0b26026b5c18f7b6b88966d9b3b28ae22ff5a251 100644 (file)
@@ -1974,6 +1974,8 @@ mymain(void)
 
     DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET);
 
+    DO_TEST("acpi-table", NONE);
+
     qemuTestDriverFree(&driver);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;