From nobody Mon May 6 09:24:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1643291499; cv=none; d=zohomail.com; s=zohoarc; b=InQIupgOG3EBMs5rkH8zoDvIvuLoefirLFuoXE9w40x+MlCv7uNl2qvJyE5QUZsG4R6hEnSsMg2r8D6YsF+g9fl0sy7tOg/13ITZaF87A+Y/lGFiQFQTwQYLhdLknsfgaRbyJL1xQiGJw81BsvmP3ZwcmaRbYBL+u6YXE0Ejctc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643291499; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=lf1OArbII2bnuTNiOT9Ir+wyg+9FIJxTXPMwlchSEss=; b=A2FXvSFrBtAPehxV3JRPdZNe2NKwMmSXrxwyoK9NqW9JWL7JZrk/3W292pYcChZesai19zqa2DDvTiU6mV82aHx7qssZ7XVLJYiwwYerOMQ4mL1tfW0N7C0V8jwJpbN3jINjTFnkhl685f5aX2GwQIc9PY6SQvCKCjHvUChyS8w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1643291499812282.2233501179079; Thu, 27 Jan 2022 05:51:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-449-2ChRgjaaM9WSzVwT0S5JmA-1; Thu, 27 Jan 2022 08:51:37 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11EC48519FD; Thu, 27 Jan 2022 13:51:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0519110F6C; Thu, 27 Jan 2022 13:51:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7AAF44BB7C; Thu, 27 Jan 2022 13:51:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20RDpUZw003848 for ; Thu, 27 Jan 2022 08:51:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6DE5B108BD90; Thu, 27 Jan 2022 13:51:30 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.194.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFC84108BEE2; Thu, 27 Jan 2022 13:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643291499; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lf1OArbII2bnuTNiOT9Ir+wyg+9FIJxTXPMwlchSEss=; b=MCn4D/FRDXMxeW0uMWY6gudGU4fbQwPNhxffh9LrP8dweEgbXwsVNT4oaoEjjdfPHiuayA 5t5Ffv8kiOGmUo6Ygn6YJsog9zop4E6hFDsdXuzjJR3lA53yz4uIfCOKBE9zjX9IZzGvJU yfae8DavAZ58zRRdDM6so4KqLNEMuBY= X-MC-Unique: 2ChRgjaaM9WSzVwT0S5JmA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH] cpu-data.py: Query hyperv enlightenments Date: Thu, 27 Jan 2022 14:51:28 +0100 Message-Id: <20220127135128.16569-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1643291503072100002 Content-Type: text/plain; charset="utf-8" Reporting hv-* properties properly requires hv to be enabled, see qemu commit 071ce4b03b. Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- tests/cputestdata/cpu-data.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py index d8a89ebc2a..0200db7a78 100755 --- a/tests/cputestdata/cpu-data.py +++ b/tests/cputestdata/cpu-data.py @@ -216,12 +216,19 @@ def gather_model(args): "id": "model-expansion" }]) =20 + version =3D 0, 0 static_model =3D None for o in output: if o.get("id") =3D=3D "model-expansion": static_model =3D o["return"]["model"] + if "QMP" in o: + version =3D o["QMP"]["version"]["qemu"] + version =3D version["major"], version["minor"] =20 if static_model: + if version[0] > 6 or (version[0] =3D=3D 6 and version[1] >=3D 1): + static_model["props"]["hv-passthrough"] =3D True + return call_qemu(args.path_to_qemu, [ { "execute": "query-cpu-model-expansion", --=20 2.31.1