From nobody Sun Feb 8 21:27:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585338707; cv=none; d=zohomail.com; s=zohoarc; b=PvIGf0EyQ/JzHAaFeaMV5PPpETYnBJc+GE4dsyxAHcmvnV9X9NrMm/omjHZIP4D7wUyRyyc7KQgGENf7Rgc43ipJnhaleUfn5HIm2YjdDRW+lpk8OgbIAEjWVbCcZ0aQBH3RBqM48chtQ8gSv0U0tPd4F+bm5bZYjzjVjHHxDXM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585338707; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3zUs8ZdLFlEGvK8rH6TmvWaKqQLQpl9G3b6UpznONeA=; b=l4K0oxfn6Shz9WbWEgB+W20ppeMNeQpnhEKCtjp31SMECQLyvyf+aLRoPfzdxl3Xop2u76rV8b6FYeSq4gc/2OloET4ZEGV7jAPtsup+TyWVEgk60T8SfEdfhh5YUbojKsYYu1+6YzCOVRtDoSvQoGpK5PMOm1prrXvTHq/70BQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1585338707174483.1147756273399; Fri, 27 Mar 2020 12:51:47 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-447-RhVUjaloN12-4mO23JP-cQ-1; Fri, 27 Mar 2020 15:51:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C62C98014D5; Fri, 27 Mar 2020 19:51:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B0425DA7D; Fri, 27 Mar 2020 19:51:36 +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 534141808878; Fri, 27 Mar 2020 19:51:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJpSCY019807 for ; Fri, 27 Mar 2020 15:51:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AD7920316F3; Fri, 27 Mar 2020 19:51:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7707420316F1 for ; Fri, 27 Mar 2020 19:51:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F5A3185A78E for ; Fri, 27 Mar 2020 19:51:26 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-457-H5AmIj4yPVydCZxlB6P67A-1; Fri, 27 Mar 2020 15:51:23 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02RJY98K121981 for ; Fri, 27 Mar 2020 15:51:22 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywbv0mafv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 15:51:22 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02RJoYQS013157 for ; Fri, 27 Mar 2020 19:51:21 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 2ywawmswqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 19:51:21 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02RJpJL956951180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Mar 2020 19:51:19 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 943406E04E; Fri, 27 Mar 2020 19:51:19 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 531306E04C; Fri, 27 Mar 2020 19:51:19 +0000 (GMT) Received: from Tobins-MBP-2.fios-router.home (unknown [9.80.203.249]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 27 Mar 2020 19:51:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585338706; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3zUs8ZdLFlEGvK8rH6TmvWaKqQLQpl9G3b6UpznONeA=; b=JrPfy/DBkwj3lgU9dOFZeZl1KlX0wYXySwoy43ej287UnyxBfRZz2mPW9ybRF3QnaBFsjV CjuRRXL3hf01sd+OVBl6nSohLpwik94QKz4s06AYhdmEVZFRztlDw4MJWdVI1npMcOAh7X sac4428MgjV+DZFQy3oWsE/u7xYZpI0= X-MC-Unique: RhVUjaloN12-4mO23JP-cQ-1 X-MC-Unique: H5AmIj4yPVydCZxlB6P67A-1 From: Tobin Feldman-Fitzthum To: libvir-list@redhat.com Subject: [libvirt PATCH 4/5] use new functions when probing Date: Fri, 27 Mar 2020 15:51:15 -0400 Message-Id: <20200327195116.70739-5-tobin@linux.vnet.ibm.com> In-Reply-To: <20200327195116.70739-1-tobin@linux.vnet.ibm.com> References: <20200327195116.70739-1-tobin@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-27_07:2020-03-27, 2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 phishscore=0 impostorscore=0 mlxlogscore=588 suspectscore=1 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270159 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02RJpSCY019807 X-loop: libvir-list@redhat.com Cc: Tobin Feldman-Fitzthum 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.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Probe for TCG with QMP right after probing for KVM. Signed-off-by: Tobin Feldman-Fitzthum --- src/qemu/qemu_capabilities.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c84ad0e831..410b58bf47 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5045,12 +5045,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, /* Some capabilities may differ depending on KVM state */ if (virQEMUCapsProbeQMPKVMState(qemuCaps, mon) < 0) return -1; + if (virQEMUCapsProbeQMPTCGState(qemuCaps, mon) < 0) + return -1; =20 - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) - type =3D VIR_DOMAIN_VIRT_KVM; - else - type =3D VIR_DOMAIN_VIRT_QEMU; - + type =3D virQEMUCapsGetVirtType(qemuCaps); accel =3D virQEMUCapsGetAccel(qemuCaps, type); =20 if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0) @@ -5543,10 +5541,7 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache, goto cleanup; } =20 - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) - capsType =3D VIR_DOMAIN_VIRT_KVM; - else - capsType =3D VIR_DOMAIN_VIRT_QEMU; + capsType =3D virQEMUCapsGetVirtType(qemuCaps); =20 if (virttype =3D=3D VIR_DOMAIN_VIRT_NONE) virttype =3D capsType; --=20 2.20.1 (Apple Git-117)