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"))
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)");
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;
(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) {
defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_APIC);
else if (STREQ(result->contents[i].key, "pae"))
defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_PAE);
+ else if (STREQ(result->contents[i].key, "hap"))
+ defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_HAP);
}
}
xen_string_string_map_free(result);
allocStringMap(&strings, (char *)"apic", (char *)"true");
if (def->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;