
# 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");