diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 6ce0c3fe7db84274c2019785fa7fa45a6adb4f58..d3633ee889679a492dd273cb32941ca949baaaa9 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -2210,6 +2210,8 @@ xenDaemonParseSxpr(virConnectPtr conn, def->features |= (1 << VIR_DOMAIN_FEATURE_APIC); if (sexpr_int(root, "domain/image/hvm/pae")) def->features |= (1 << VIR_DOMAIN_FEATURE_PAE); + if (sexpr_int(root, "domain/image/hvm/hap")) + def->features |= (1 << VIR_DOMAIN_FEATURE_HAP); /* Old XenD only allows localtime here for HVM */ if (sexpr_int(root, "domain/image/hvm/localtime")) @@ -5923,6 +5925,8 @@ xenDaemonFormatSxpr(virConnectPtr conn, virBufferAddLit(&buf, "(apic 1)"); if (def->features & (1 << VIR_DOMAIN_FEATURE_PAE)) virBufferAddLit(&buf, "(pae 1)"); + if (def->features & (1 << VIR_DOMAIN_FEATURE_HAP)) + virBufferAddLit(&buf, "(hap 1)"); virBufferAddLit(&buf, "(usb 1)"); diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 4d6b41b0326f7e3c4c616e3cf7b65f1b4fa83762..ec618aa428dbb09657a824172fb0a2d1910d36bf 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -830,6 +830,10 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) { goto cleanup; else if (val) def->features |= (1 << VIR_DOMAIN_FEATURE_APIC); + if (xenXMConfigGetBool(conf, "hap", &val, 0) < 0) + goto cleanup; + else if (val) + def->features |= (1 << VIR_DOMAIN_FEATURE_HAP); } if (xenXMConfigGetBool(conf, "localtime", &vmlocaltime, 0) < 0) goto cleanup; @@ -2409,6 +2413,10 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn, (1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0) goto no_memory; + if (xenXMConfigSetInt(conf, "hap", + (def->features & + (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) + goto no_memory; if (def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME) { if (def->clock.data.timezone) { diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 6fff276806327e97f7afd7fd2d3d2399c062ffd6..fffa6170f8e1c6c3f1a94c7868e7e6be9905ccc5 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1358,6 +1358,8 @@ xenapiDomainDumpXML (virDomainPtr dom, int flags ATTRIBUTE_UNUSED) defPtr->features = defPtr->features | (1<contents[i].key, "pae")) defPtr->features = defPtr->features | (1<contents[i].key, "hap")) + defPtr->features = defPtr->features | (1<features & (1 << VIR_DOMAIN_FEATURE_PAE)) allocStringMap(&strings, (char *)"pae", (char *)"true"); + if (def->features & (1 << VIR_DOMAIN_FEATURE_HAP)) + allocStringMap(&strings, (char *)"hap", (char *)"true"); } if (strings != NULL) (*record)->platform = strings;