<initrd>/root/f8-i386-initrd</initrd>
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
<dtb>/root/ppc.dtb</dtb>
+ <acpi>
+ <table type='slic'>/path/to/slic.dat</table>
+ </acpi>
</os>
...</pre>
<dd>The contents of this element specify the fully-qualified path
to the (optional) device tree binary (dtb) image in the host OS.
<span class="since">Since 1.0.4</span></dd>
+ <dt><code>acpi</code></dt>
+ <dd>The <code>table</code> element contains a fully-qualified path
+ to the ACPI table. The <code>type</code> attribute contains the
+ ACPI table type (currently only <code>slic</code> is supported)
+ <span class="since">Since 1.3.5 (QEMU only)</span></dd>
</dl>
<h4><a name="elementsOSContainer">Container boot</a></h4>
<optional>
<ref name="bios"/>
</optional>
+ <optional>
+ <ref name="acpiTable"/>
+ </optional>
</interleave>
</element>
</define>
</data>
</define>
+ <define name="acpiTable">
+ <element name="acpi">
+ <zeroOrMore>
+ <element name="table">
+ <attribute name="type">
+ <choice>
+ <value>slic</value>
+ </choice>
+ </attribute>
+ <ref name="absFilePath"/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
<define name="smbios">
<element name="smbios">
<attribute name="mode">
VIR_FREE(def->os.cmdline);
VIR_FREE(def->os.dtb);
VIR_FREE(def->os.root);
+ VIR_FREE(def->os.slic_table);
virDomainLoaderDefFree(def->os.loader);
VIR_FREE(def->os.bootloader);
VIR_FREE(def->os.bootloaderArgs);
virHashTablePtr *bootHash)
{
xmlNodePtr *nodes = NULL;
+ xmlNodePtr oldnode;
+ char *tmp = NULL;
int ret = -1;
size_t i;
int n;
}
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
+ if ((n = virXPathNodeSet("./os/acpi/table", ctxt, &nodes)) < 0)
+ goto error;
+
+ if (n > 1) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("Only one acpi table is supported"));
+ goto error;
+ }
+
+ if (n == 1) {
+ oldnode = ctxt->node;
+ ctxt->node = nodes[0];
+ tmp = virXPathString("string(./@type)", ctxt);
+
+ if (!tmp) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("Missing acpi table type"));
+ goto error;
+ }
+
+ if (STREQ_NULLABLE(tmp, "slic")) {
+ VIR_FREE(tmp);
+ tmp = virXPathString("string(.)", ctxt);
+ def->os.slic_table = virFileSanitizePath(tmp);
+ VIR_FREE(tmp);
+ } else {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Unknown acpi table type: %s"),
+ tmp);
+ goto error;
+ }
+ ctxt->node = oldnode;
+ }
+
if (virDomainDefParseBootXML(ctxt, def) < 0)
goto error;
if (!(*bootHash = virHashCreate(5, NULL)))
error:
VIR_FREE(nodes);
+ VIR_FREE(tmp);
return ret;
}
def->os.dtb);
virBufferEscapeString(buf, "<root>%s</root>\n",
def->os.root);
+ if (def->os.slic_table) {
+ virBufferAddLit(buf, "<acpi>\n");
+ virBufferAdjustIndent(buf, 2);
+ virBufferEscapeString(buf, "<table type='slic'>%s</table>\n",
+ def->os.slic_table);
+ virBufferAdjustIndent(buf, -2);
+ virBufferAddLit(buf, "</acpi>\n");
+ }
if (!def->os.bootloader) {
for (n = 0; n < def->os.nBootDevs; n++) {
char *cmdline;
char *dtb;
char *root;
+ char *slic_table;
virDomainLoaderDefPtr loader;
char *bootloader;
char *bootloaderArgs;
--- /dev/null
+<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>
+ </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</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>
--- /dev/null
+<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>
+ </acpi>
+ <boot dev='hd'/>
+ </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</emulator>
+ <controller type='usb' index='0'>
+ <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'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
DO_TEST("virtio-input-passthrough");
virObjectUnref(cfg);
+
+ DO_TEST("acpi-table");
+
qemuTestDriverFree(&driver);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;