From nobody Mon Feb 9 04:14:31 2026 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=1641892212; cv=none; d=zohomail.com; s=zohoarc; b=i36NGLjFkW6DTcPOinvesfTktDN22NdXT7qShDk9GsnIRsEHbyUsd9aIAcfaF6V1d1uriMoNrQbzJXxX3Qs/L83t/A3hINPDwKp9x5swmgUU0lvZjOFESL4UgEhFfWe9h/782TpPKSkqNEEUk29A+zhYXKDp2HXfVQGvQk+85kI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641892212; 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=gT4jUBMkPm/ffl+6fTpFNjgv+EepZGCJsEHoDxr6z9I=; b=KyyaAxqC5ZypuZ1OMVPFZFBhPIAsM9DgkWsFVdW4oeS9d7C7BH8eSZXInSjLTeRCk8fFrmUj1SidSKzcg+lYisLrfw5n2RvhX9BIVe9dICN1PBrlLChmd+rj/ADj4vosGT2AcMPrQNA7JD4vNzEHWAca7nxq7mprysAtcYMN90w= 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 1641892212465959.3795387827158; Tue, 11 Jan 2022 01:10:12 -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-495-l3w0J957O725NQ2JNuc05g-1; Tue, 11 Jan 2022 04:10:07 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E604D3488C; Tue, 11 Jan 2022 09:09:55 +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 C63897B9E4; Tue, 11 Jan 2022 09:09:55 +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 907CB4CA9B; Tue, 11 Jan 2022 09:09:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20B99jl1029354 for ; Tue, 11 Jan 2022 04:09:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id A544F6F116; Tue, 11 Jan 2022 09:09:45 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 890D754461; Tue, 11 Jan 2022 09:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641892211; 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=gT4jUBMkPm/ffl+6fTpFNjgv+EepZGCJsEHoDxr6z9I=; b=cG3NE/Xm20+LEvk3WRATsrPL1DCP4tgYqh5GZtuh1iyMHXcuIbbOKlij65j7VkTX+41Z5f x/iI48MU3ECXmHqv6L6s2N3hPNCV5ZqHDAuUXBAb0iOczDPQpHRWRrZe681d/Jvfp5eocH ZfnEWSUDBeRgJiEBaEpnZeDocdDZL9A= X-MC-Unique: l3w0J957O725NQ2JNuc05g-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v5 01/20] qemu: Only probe KVM on Linux Date: Tue, 11 Jan 2022 10:09:21 +0100 Message-Id: <20220111090940.1315732-2-abologna@redhat.com> In-Reply-To: <20220111090940.1315732-1-abologna@redhat.com> References: <20220111090940.1315732-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: r.bolshakov@yadro.com 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.12 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641892214838100001 We already know it's not going to be available on other platforms. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Andrea Bolognani Tested-by: Brad Laue --- src/qemu/qemu_process.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5c9ca0fe4f..c2c10d282a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -9269,6 +9269,12 @@ qemuProcessQMPInit(qemuProcessQMP *proc) } =20 =20 +#if defined(__linux__) +# define hwaccel "kvm:tcg" +#else +# define hwaccel "tcg" +#endif + static int qemuProcessQMPLaunch(qemuProcessQMP *proc) { @@ -9279,7 +9285,7 @@ qemuProcessQMPLaunch(qemuProcessQMP *proc) if (proc->forceTCG) machine =3D "none,accel=3Dtcg"; else - machine =3D "none,accel=3Dkvm:tcg"; + machine =3D "none,accel=3D" hwaccel; =20 VIR_DEBUG("Try to probe capabilities of '%s' via QMP, machine %s", proc->binary, machine); --=20 2.31.1