+Tue Aug 15 11:55:15 EDT 2006 Daniel Berrange <berrange@redhat.com>
+
+ * src/xml.c, src/xend_internal.c: Added a <features> block
+ to XML allowing enablement of guest CPU / system features.
+ Currently support PAE, ACPI, APIC for HVM domains.
+ * docs/libvir.html: Documented new <features> block and those
+ features enabled for HVM guests
+
Mon Aug 14 10:55:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* docs/libvir.html, docs/format.html: Updated description of
<os>
<span style="color: #0000E5; background-color: #FFFFFF"><type>hvm</type></span>
<span style="color: #0000E5; background-color: #FFFFFF"><loader>/usr/lib/xen/boot/hvmloader</loader></span>
- <span style="color: #0000E5; background-color: #FFFFFF"><boot dev='da'/></span>
+ <span style="color: #0000E5; background-color: #FFFFFF"><boot dev='hd'/></span>
</os>
<memory>524288</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
+ <features>
+ <span style="color: #E50000; background-color: #FFFFFF"><pae/>
+ <acpi/>
+ <apic/></span>
+ </features>
<devices>
<span style="color: #0000E5; background-color: #FFFFFF"><emulator>/usr/lib/xen/bin/qemu-dm</emulator></span>
<interface type='bridge'>
</disk>
<span style="color: #0000E5; background-color: #FFFFFF"><graphics type='vnc' port='5904'/></span>
</devices>
-</domain></pre><p>There is a few things to notice specifically for HVM domains:</p><ul><li>the <code><os></code> block description is very different, first it indicates
+</domain></pre><p>There is a few things to notice specifically for HVM domains:</p><ul><li>the optional <code><features></code> block is used to enable certain
+ guest CPU / system features. For HVM guests the following features are defined:
+ <ul><li><code>pae</code> - enable PAE memory addressing</li>
+ <li><code>apic</code> - enable IO APIC</li>
+ <li><code>acpi</code> - enable ACPI bios</li>
+ </ul></li>
+ <li>the <code><os></code> block description is very different, first it indicates
that the type is 'hvm' for hardware virtualization, then instead of a
kernel, boot and command line arguments, it points to an os boot loader
which will extract the boot informations from the boot device specified
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
+ <features>
+ <span style="color: #E50000; background-color: #FFFFFF"><pae/>
+ <acpi/>
+ <apic/></span>
+ </features>
<devices>
<span style="color: #0000E5; background-color: #FFFFFF"><emulator>/usr/lib/xen/bin/qemu-dm</emulator></span>
<interface type='bridge'>
<p>There is a few things to notice specifically for HVM domains:</p>
<ul>
+ <li>the optional <code><features></code> block is used to enable certain
+ guest CPU / system features. For HVM guests the following features are defined:
+ <ul>
+ <li><code>pae</code> - enable PAE memory addressing</li>
+ <li><code>apic</code> - enable IO APIC</li>
+ <li><code>acpi</code> - enable ACPI bios</li>
+ </ul>
+ </li>
<li>the <code><os></code> block description is very different, first it indicates
that the type is 'hvm' for hardware virtualization, then instead of a
kernel, boot and command line arguments, it points to an os boot loader
if (tmp != NULL)
virBufferVSprintf(&buf, " <on_crash>%s</on_crash>\n", tmp);
+ if (hvm) {
+ virBufferAdd(&buf, " <features>\n", 13);
+ if (sexpr_int(root, "domain/image/hvm/acpi"))
+ virBufferAdd(&buf, " <acpi/>\n", 12);
+ if (sexpr_int(root, "domain/image/hvm/apic"))
+ virBufferAdd(&buf, " <apic/>\n", 12);
+ if (sexpr_int(root, "domain/image/hvm/pae"))
+ virBufferAdd(&buf, " <pae/>\n", 11);
+ virBufferAdd(&buf, " </features>\n", 14);
+ }
+
virBufferAdd(&buf, " <devices>\n", 12);
/* in case of HVM we have devices emulation */
return (ret);
}
-#endif
+#endif /* 0 - UNUSED */
#ifndef PROXY
/**
xmlXPathFreeObject(obj);
obj = NULL;
}
+
+ obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt);
+ if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
+ (obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
+ virBufferAdd(buf, "(acpi 1)", 8);
+ xmlXPathFreeObject(obj);
+ obj = NULL;
+ }
+ obj = xmlXPathEval(BAD_CAST "/domain/features/apic", ctxt);
+ if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
+ (obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
+ virBufferAdd(buf, "(apic 1)", 8);
+ xmlXPathFreeObject(obj);
+ obj = NULL;
+ }
+ obj = xmlXPathEval(BAD_CAST "/domain/features/pae", ctxt);
+ if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
+ (obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
+ virBufferAdd(buf, "(pae 1)", 7);
+ xmlXPathFreeObject(obj);
+ obj = NULL;
+ }
}
obj = xmlXPathEval(BAD_CAST "count(domain/devices/console) > 0", ctxt);