# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1257459289 28800
# Node ID 2626e8fa10ad022b1ddee21efd46ffa950938200
# Parent 2a194008eef87ee652bf550030203e3ef81b7468
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 2a194008eef8 -r 2626e8fa10ad 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:14:49 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 2626e8fa10ad 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:14:49 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 2626e8fa10ad libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Fri Oct 30 15:42:45 2009 -0700
+++ b/libxkutil/xmlgen.c Thu Nov 05 14:14:49 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 2626e8fa10ad 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:14:49 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 2626e8fa10ad 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:14:49 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 2626e8fa10ad 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:14:49 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");