mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
xenconfig: set HVM pae/apic/acpi/ default to 1
According to xm.config manual, HVM pae|apic|acpi feature default is 1 (enabled). But in conversion from xm config to libvirt xml, if xm config doesn't contain pae|apic|acpi, it sets default value to 0, this causes some problems in HVM guest. Update parser codes to set HVM pae|apic|acpi default value to 1 to match xm config convension. Signed-off-by: Chunyan Liu <cyliu@suse.com>
This commit is contained in:
parent
4f524212ce
commit
90ed3bd0aa
@ -512,17 +512,17 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def)
|
||||
return -1;
|
||||
|
||||
if (STREQ(def->os.type, "hvm")) {
|
||||
if (xenConfigGetBool(conf, "pae", &val, 0) < 0)
|
||||
if (xenConfigGetBool(conf, "pae", &val, 1) < 0)
|
||||
return -1;
|
||||
|
||||
else if (val)
|
||||
def->features[VIR_DOMAIN_FEATURE_PAE] = VIR_TRISTATE_SWITCH_ON;
|
||||
if (xenConfigGetBool(conf, "acpi", &val, 0) < 0)
|
||||
if (xenConfigGetBool(conf, "acpi", &val, 1) < 0)
|
||||
return -1;
|
||||
|
||||
else if (val)
|
||||
def->features[VIR_DOMAIN_FEATURE_ACPI] = VIR_TRISTATE_SWITCH_ON;
|
||||
if (xenConfigGetBool(conf, "apic", &val, 0) < 0)
|
||||
if (xenConfigGetBool(conf, "apic", &val, 1) < 0)
|
||||
return -1;
|
||||
|
||||
else if (val)
|
||||
|
Loading…
Reference in New Issue
Block a user