提交 95d19cd0 编写于 作者: M Marek Marczykowski-Górecki 提交者: Jim Fehlig

libxl: prefer new location of nested_hvm in libxl_domain_build_info

If available, use b_info->nested_hvm instead of
b_info->u.hvm.nested_hvm. This will make nested HVM config available
also for PVH domains.
Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: NJim Fehlig <jfehlig@suse.com>
上级 d4a8fa0c
...@@ -455,7 +455,18 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, ...@@ -455,7 +455,18 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
} }
} }
} }
libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); #ifdef LIBXL_HAVE_BUILDINFO_NESTED_HVM
libxl_defbool_set(&b_info->nested_hvm, hasHwVirt);
#else
if (hvm) {
libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt);
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported nested HVM setting for %s machine on this Xen version"),
def->os.machine);
return -1;
}
#endif
} }
if (def->cpu && def->cpu->mode == VIR_CPU_MODE_CUSTOM) { if (def->cpu && def->cpu->mode == VIR_CPU_MODE_CUSTOM) {
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
], ],
"sched_params": { "sched_params": {
}, },
"nested_hvm": "False",
"type.hvm": { "type.hvm": {
"pae": "True", "pae": "True",
"apic": "True", "apic": "True",
"acpi": "True", "acpi": "True",
"nested_hvm": "False",
"nographic": "True", "nographic": "True",
"vnc": { "vnc": {
"enable": "False" "enable": "False"
......
...@@ -109,11 +109,11 @@ ...@@ -109,11 +109,11 @@
"sched_params": { "sched_params": {
}, },
"nested_hvm": "True",
"type.hvm": { "type.hvm": {
"pae": "True", "pae": "True",
"apic": "True", "apic": "True",
"acpi": "True", "acpi": "True",
"nested_hvm": "True",
"vga": { "vga": {
"kind": "cirrus" "kind": "cirrus"
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册