From nobody Sat Feb 7 08:02:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.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 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585354969; cv=none; d=zohomail.com; s=zohoarc; b=coOAvZb+nwjBUaYY5ipYDgKRes/EJ5VRbz7VZPGIlzzFWNoSceXT30/SstNbHgP9D3jcrXHbL64X9UIzco8l+kSDklzAZlm/5T7vk6s/js+XwTxLGZV6bk961rIHSCjWhLGzYSFHCK7JQZyGTI06mnf0gtu6Fh3SjFZ3aOqqoA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585354969; 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=//NHwlMd6aSN8Bf43aG7/nBv3RJxcVr0inctulSDiTc=; b=kZpGgvGsjZlH3G21fULlPwqvGCCpdUfsxE2Re1dEDgWjcFkX90HtF0hUN0t62R/M1FvYECGRwAugEb+4JqmpxMVTLc6wlj+//Vmgt01HuwR/FH4kv7E8LiVLGmZvDQiN9E5uevFEwMXt228Hq4wR2++vsamgOYy64nZ7t2iPqu4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585354969345305.1811478325013; Fri, 27 Mar 2020 17:22:49 -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-2-cp2FzCJTNq6l9CV8Zhlq_w-1; Fri, 27 Mar 2020 20:22:45 -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 55E34189F764; Sat, 28 Mar 2020 00:22:40 +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 255985DA81; Sat, 28 Mar 2020 00:22:40 +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 9881D18089C8; Sat, 28 Mar 2020 00:22:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02S0MZ51026272 for ; Fri, 27 Mar 2020 20:22:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 725351004C46; Sat, 28 Mar 2020 00:22:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E98710054DC for ; Sat, 28 Mar 2020 00:22:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (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 7A7758FF663 for ; Sat, 28 Mar 2020 00:22:33 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-79-bvghiu32PMyyRo-VyIRfNQ-1; Fri, 27 Mar 2020 20:22:31 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02S03EkN045216 for ; Fri, 27 Mar 2020 20:22:29 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ywek1cbud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 20:22:29 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02S0JhGn019849 for ; Sat, 28 Mar 2020 00:22:28 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma04wdc.us.ibm.com with ESMTP id 2ywaw9p7kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 28 Mar 2020 00:22:28 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02S0MRIn52625888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 00:22:27 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B4D46AC05B; Sat, 28 Mar 2020 00:22:27 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 968DCAC05F; Sat, 28 Mar 2020 00:22:27 +0000 (GMT) Received: from Tobins-MBP-2.fios-router.home (unknown [9.85.173.9]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Sat, 28 Mar 2020 00:22:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585354967; 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=//NHwlMd6aSN8Bf43aG7/nBv3RJxcVr0inctulSDiTc=; b=SEQTkabS+FpmFl7ANdTMYDjNrZoUci3pEHETaY8R3UanLXyrYC91QTDE0Gb0hBDT0ulCgM +RNBkClPvxQACFNtS/ZLGM2+AEVBVuA/Nowvfz6PxxMi2nYdxdBCFh0N3EBh0rDk2rCp8y 27yEdRjzvpE4cTuJ+sBPtkBiekwHZ2g= X-MC-Unique: cp2FzCJTNq6l9CV8Zhlq_w-1 X-MC-Unique: bvghiu32PMyyRo-VyIRfNQ-1 From: Tobin Feldman-Fitzthum To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/5] add virQEMUCapsGetVirtType convenience function Date: Fri, 27 Mar 2020 20:22:24 -0400 Message-Id: <20200328002227.36555-3-tobin@linux.vnet.ibm.com> In-Reply-To: <20200328002227.36555-1-tobin@linux.vnet.ibm.com> References: <20200328002227.36555-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_09:2020-03-27, 2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 suspectscore=1 spamscore=0 mlxscore=0 mlxlogscore=490 adultscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270198 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02S0MZ51026272 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" Signed-off-by: Tobin Feldman-Fitzthum --- src/qemu/qemu_capabilities.c | 14 ++++++++++++++ src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 61123f0e63..0b44ee0745 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4957,6 +4957,20 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr= qemuCaps, #define QEMU_MIN_MINOR 5 #define QEMU_MIN_MICRO 0 =20 +virDomainVirtType +virQEMUCapsGetVirtType(virQEMUCapsPtr qemuCaps) +{ + virDomainVirtType type; + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) + type =3D VIR_DOMAIN_VIRT_KVM; + else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG_DISABLED)) + type =3D VIR_DOMAIN_VIRT_QEMU; + else + type =3D VIR_DOMAIN_VIRT_NONE; + + return type; +} + int virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, qemuMonitorPtr mon) diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 372806f585..aa73c7c6e1 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -630,6 +630,8 @@ int virQEMUCapsGetCPUFeatures(virQEMUCapsPtr qemuCaps, bool migratable, char ***features); =20 +virDomainVirtType virQEMUCapsGetVirtType(virQEMUCapsPtr qemuCaps); + bool virQEMUCapsIsArchSupported(virQEMUCapsPtr qemuCaps, virArch arch); bool virQEMUCapsIsVirtTypeSupported(virQEMUCapsPtr qemuCaps, --=20 2.20.1 (Apple Git-117)