[PATCH 0 of 2] #2 Expose remaining features: apic and pae

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1257459645 28800 # Node ID f82b7a0c6f21bae8587449fd949dc011cf5b7fb9 # Parent 2a194008eef87ee652bf550030203e3ef81b7468 (#2) Allow user to enable APIC support when defining a guest Update: -Add appropriate subject to patch Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 2a194008eef8 -r f82b7a0c6f21 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Fri Oct 30 15:42:45 2009 -0700 +++ b/libxkutil/device_parsing.c Thu Nov 05 14:20:45 2009 -0800 @@ -873,6 +873,8 @@ for (child = features->children; child != NULL; child = child->next) { if (XSTREQ(child->name, "acpi")) dominfo->acpi = true; + else if (XSTREQ(child->name, "apic")) + dominfo->apic = true; } return 1; diff -r 2a194008eef8 -r f82b7a0c6f21 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Fri Oct 30 15:42:45 2009 -0700 +++ b/libxkutil/device_parsing.h Thu Nov 05 14:20:45 2009 -0800 @@ -127,6 +127,7 @@ char *bootloader_args; char *clock; bool acpi; + bool apic; union { struct pv_os_info pv; diff -r 2a194008eef8 -r f82b7a0c6f21 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Fri Oct 30 15:42:45 2009 -0700 +++ b/libxkutil/xmlgen.c Thu Nov 05 14:20:45 2009 -0800 @@ -581,12 +581,14 @@ if (domain->type == DOMAIN_XENFV) { xmlNewChild(features, NULL, BAD_CAST "pae", NULL); - xmlNewChild(features, NULL, BAD_CAST "apic", NULL); } if (domain->acpi) xmlNewChild(features, NULL, BAD_CAST "acpi", NULL); + if (domain->apic) + xmlNewChild(features, NULL, BAD_CAST "apic", NULL); + return NULL; } diff -r 2a194008eef8 -r f82b7a0c6f21 schema/Virt_VSSD.mof --- a/schema/Virt_VSSD.mof Fri Oct 30 15:42:45 2009 -0700 +++ b/schema/Virt_VSSD.mof Thu Nov 05 14:20:45 2009 -0800 @@ -18,4 +18,7 @@ [Description ("Flag to determine whether this guest has acpi enabled")] boolean EnableACPI; + [Description ("Flag to determine whether this guest has apic enabled")] + boolean EnableAPIC; + }; diff -r 2a194008eef8 -r f82b7a0c6f21 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Fri Oct 30 15:42:45 2009 -0700 +++ b/src/Virt_VSSD.c Thu Nov 05 14:20:45 2009 -0800 @@ -214,6 +214,9 @@ CMSetProperty(inst, "EnableACPI", (CMPIValue *)&dominfo->acpi, CMPI_boolean); + CMSetProperty(inst, "EnableAPIC", + (CMPIValue *)&dominfo->apic, CMPI_boolean); + if (dominfo->clock != NULL) { uint16_t clock = VSSD_CLOCK_UTC; diff -r 2a194008eef8 -r f82b7a0c6f21 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Oct 30 15:42:45 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Thu Nov 05 14:20:45 2009 -0800 @@ -472,12 +472,25 @@ fullvirt = false; if (cu_get_bool_prop(inst, "EnableACPI", &bool_val) != CMPI_RC_OK) { + /* Always set for XenFV and KVM guests */ if (fullvirt || STREQC(pfx, "KVM")) bool_val = true; + else + bool_val = false; } domain->acpi = bool_val; + if (cu_get_bool_prop(inst, "EnableAPIC", &bool_val) != CMPI_RC_OK) { + /* Always set for XenFV guests */ + if (fullvirt && !STREQC(pfx, "KVM")) + bool_val = true; + else + bool_val = false; + } + + domain->apic = bool_val; + if (cu_get_u16_prop(inst, "ClockOffset", &tmp) == CMPI_RC_OK) { if (tmp == VSSD_CLOCK_UTC) domain->clock = strdup("utc");

# HG changeset patch # User Kaitlin Rupert <karupert@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@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");

+1 On 11/05/2009 08:20 PM, Kaitlin Rupert wrote:
Update to patch 2.
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Richard Maciel, MSc IBM Linux Technology Center rmaciel@linux.vnet.ibm.com
participants (2)
-
Kaitlin Rupert
-
Richard Maciel