
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1257459289 28800 # Node ID 2835f92785b2df6b2b9b384cde4561d12b8ef703 # Parent 2626e8fa10ad022b1ddee21efd46ffa950938200 Allow user to enable PAE support when defining a guest Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 2626e8fa10ad -r 2835f92785b2 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Thu Nov 05 14:14:49 2009 -0800 +++ b/libxkutil/device_parsing.c Thu Nov 05 14:14:49 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 2626e8fa10ad -r 2835f92785b2 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Thu Nov 05 14:14:49 2009 -0800 +++ b/libxkutil/device_parsing.h Thu Nov 05 14:14:49 2009 -0800 @@ -128,6 +128,7 @@ char *clock; bool acpi; bool apic; + bool pae; union { struct pv_os_info pv; diff -r 2626e8fa10ad -r 2835f92785b2 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Nov 05 14:14:49 2009 -0800 +++ b/libxkutil/xmlgen.c Thu Nov 05 14:14:49 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 2626e8fa10ad -r 2835f92785b2 schema/Virt_VSSD.mof --- a/schema/Virt_VSSD.mof Thu Nov 05 14:14:49 2009 -0800 +++ b/schema/Virt_VSSD.mof Thu Nov 05 14:14:49 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 2626e8fa10ad -r 2835f92785b2 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Thu Nov 05 14:14:49 2009 -0800 +++ b/src/Virt_VSSD.c Thu Nov 05 14:14:49 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 2626e8fa10ad -r 2835f92785b2 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Nov 05 14:14:49 2009 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Thu Nov 05 14:14:49 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");