mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
cpu-data.py: Query hyperv enlightenments
Reporting hv-* properties properly requires hv to be enabled, see qemu commit 071ce4b03b. Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6abfe77f0b
commit
50a40c8d52
@ -216,12 +216,19 @@ def gather_model(args):
|
|||||||
"id": "model-expansion"
|
"id": "model-expansion"
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
version = 0, 0
|
||||||
static_model = None
|
static_model = None
|
||||||
for o in output:
|
for o in output:
|
||||||
if o.get("id") == "model-expansion":
|
if o.get("id") == "model-expansion":
|
||||||
static_model = o["return"]["model"]
|
static_model = o["return"]["model"]
|
||||||
|
if "QMP" in o:
|
||||||
|
version = o["QMP"]["version"]["qemu"]
|
||||||
|
version = version["major"], version["minor"]
|
||||||
|
|
||||||
if static_model:
|
if static_model:
|
||||||
|
if version[0] > 6 or (version[0] == 6 and version[1] >= 1):
|
||||||
|
static_model["props"]["hv-passthrough"] = True
|
||||||
|
|
||||||
return call_qemu(args.path_to_qemu, [
|
return call_qemu(args.path_to_qemu, [
|
||||||
{
|
{
|
||||||
"execute": "query-cpu-model-expansion",
|
"execute": "query-cpu-model-expansion",
|
||||||
|
Loading…
Reference in New Issue
Block a user