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:
Tim Wiederhake 2022-01-25 12:18:23 +01:00
parent 6abfe77f0b
commit 50a40c8d52

View File

@ -216,12 +216,19 @@ def gather_model(args):
"id": "model-expansion"
}])
version = 0, 0
static_model = None
for o in output:
if o.get("id") == "model-expansion":
static_model = o["return"]["model"]
if "QMP" in o:
version = o["QMP"]["version"]["qemu"]
version = version["major"], version["minor"]
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, [
{
"execute": "query-cpu-model-expansion",