# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1257459654 28800
# Node ID 910c18bbb6264c90294375e94882e600f3dd8237
# Parent f82b7a0c6f21bae8587449fd949dc011cf5b7fb9
Allow user to enable PAE support when defining a guest
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r f82b7a0c6f21 -r 910c18bbb626 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Thu Nov 05 14:20:45 2009 -0800
+++ b/libxkutil/device_parsing.c Thu Nov 05 14:20:54 2009 -0800
@@ -875,6 +875,8 @@
dominfo->acpi = true;
else if (XSTREQ(child->name, "apic"))
dominfo->apic = true;
+ else if (XSTREQ(child->name, "pae"))
+ dominfo->pae = true;
}
return 1;
diff -r f82b7a0c6f21 -r 910c18bbb626 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Thu Nov 05 14:20:45 2009 -0800
+++ b/libxkutil/device_parsing.h Thu Nov 05 14:20:54 2009 -0800
@@ -128,6 +128,7 @@
char *clock;
bool acpi;
bool apic;
+ bool pae;
union {
struct pv_os_info pv;
diff -r f82b7a0c6f21 -r 910c18bbb626 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Thu Nov 05 14:20:45 2009 -0800
+++ b/libxkutil/xmlgen.c Thu Nov 05 14:20:54 2009 -0800
@@ -579,16 +579,15 @@
if (features == NULL)
return "Failed to allocate XML memory";
- if (domain->type == DOMAIN_XENFV) {
- xmlNewChild(features, NULL, BAD_CAST "pae", NULL);
- }
-
if (domain->acpi)
xmlNewChild(features, NULL, BAD_CAST "acpi", NULL);
if (domain->apic)
xmlNewChild(features, NULL, BAD_CAST "apic", NULL);
+ if (domain->pae)
+ xmlNewChild(features, NULL, BAD_CAST "pae", NULL);
+
return NULL;
}
diff -r f82b7a0c6f21 -r 910c18bbb626 schema/Virt_VSSD.mof
--- a/schema/Virt_VSSD.mof Thu Nov 05 14:20:45 2009 -0800
+++ b/schema/Virt_VSSD.mof Thu Nov 05 14:20:54 2009 -0800
@@ -21,4 +21,7 @@
[Description ("Flag to determine whether this guest has apic enabled")]
boolean EnableAPIC;
+ [Description ("Flag to determine whether this guest has pae enabled")]
+ boolean EnablePAE;
+
};
diff -r f82b7a0c6f21 -r 910c18bbb626 src/Virt_VSSD.c
--- a/src/Virt_VSSD.c Thu Nov 05 14:20:45 2009 -0800
+++ b/src/Virt_VSSD.c Thu Nov 05 14:20:54 2009 -0800
@@ -217,6 +217,9 @@
CMSetProperty(inst, "EnableAPIC",
(CMPIValue *)&dominfo->apic, CMPI_boolean);
+ CMSetProperty(inst, "EnablePAE",
+ (CMPIValue *)&dominfo->pae, CMPI_boolean);
+
if (dominfo->clock != NULL) {
uint16_t clock = VSSD_CLOCK_UTC;
diff -r f82b7a0c6f21 -r 910c18bbb626 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Thu Nov 05 14:20:45 2009 -0800
+++ b/src/Virt_VirtualSystemManagementService.c Thu Nov 05 14:20:54 2009 -0800
@@ -491,6 +491,16 @@
domain->apic = bool_val;
+ if (cu_get_bool_prop(inst, "EnablePAE", &bool_val) != CMPI_RC_OK)
{
+ /* Always set for XenFV guests */
+ if (fullvirt && !STREQC(pfx, "KVM"))
+ bool_val = true;
+ else
+ bool_val = false;
+ }
+
+ domain->pae = bool_val;
+
if (cu_get_u16_prop(inst, "ClockOffset", &tmp) == CMPI_RC_OK) {
if (tmp == VSSD_CLOCK_UTC)
domain->clock = strdup("utc");