From nobody Fri Oct 18 06:21:33 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=1678135629; cv=none; d=zohomail.com; s=zohoarc; b=lofHv3fbrfj5awaukYiFsRNLa6hXYZSC0yGlvitH3fQLfFgidKvxzKiKmKltycbMTVdei7QMi4Lp5GSFZR2UiZGJikMr5jF5p18kutqAggR+Ti++l8MjlspO9YKTDp3vyiCjZ5m1RMXdqHgO7eo4gcHoGHnF8OEF1KzYRDIgcVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135629; h=Content-Type:Content-Transfer-Encoding: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=mW5UK6YVTS0iBeEmo0otMUxNvOCI7ELXTAImoQL28v0=; b=AMDTjsbn/MC1ylPufe6DfJQCt67xCpZVVtU5TWkJAW6pDPMSNNTnnJ4YNdaIvq9kvdTmUXSME9x3HBsCVivxwVcn6Gr0ISvxyMRdH3FMDHhuoQmsUXn7/TTuHtsMktLQe/c0BQe/qJe+IPBA0VjWnlo8GSn7Fgs2MGlGHMd/BYU= 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 167813562919787.65880727846434; Mon, 6 Mar 2023 12:47:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-CXN1ylZuOxmUSqmdDjKcJw-1; Mon, 06 Mar 2023 15:47:04 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3023C8027FD; Mon, 6 Mar 2023 20:46:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DC43C16029; Mon, 6 Mar 2023 20:46:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 00471194658D; Mon, 6 Mar 2023 20:46:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 05AF51946589 for ; Mon, 6 Mar 2023 20:46:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E1764440E0; Mon, 6 Mar 2023 20:46:56 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA1351FF for ; Mon, 6 Mar 2023 20:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=mW5UK6YVTS0iBeEmo0otMUxNvOCI7ELXTAImoQL28v0=; b=VGWmpoq6p3y+2jT2IVR63MUB7A+Lc5ZLOCRzxc6szqxaRCIqgvBFZVvBF4f6MGuDzVpI9J 4fe+HZFw2GLVY/JL87iPDFMzzUMomvGkFvLw5W84WlvNNfgFzcERPViMfO1EZN/Ow1qlgw Klj3Tfkrn3WMvdq+NfYSdROuvT+40E0= X-MC-Unique: CXN1ylZuOxmUSqmdDjKcJw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/15] qemu: command: Replace caps check for QEMU_CAPS_MACH_VIRT_GIC_VERSION by arch check Date: Mon, 6 Mar 2023 21:46:36 +0100 Message-Id: <1e4b4610c71c5181a046f94025822e8da3a8d672.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1678135631067100002 Content-Type: text/plain; charset="utf-8" QEMU_CAPS_MACH_VIRT_GIC_VERSION is always asserted for VIR_ARCH_AARCH64. Note that this patch is a direct conversion of the logic originally residing in the capabilities code. A better coversion would be (based on whether it is available for just AARCH64 or also ARM) to base it on the guest architecture. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8d96f69f3d..41abecdb05 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6636,8 +6636,7 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf, virBufferAsprintf(buf, ",smm=3D%s", virTristateSwitchTypeToString(= smm)); if (def->features[VIR_DOMAIN_FEATURE_GIC] =3D=3D VIR_TRISTATE_SWITCH_O= N) { - bool hasGICVersionOption =3D virQEMUCapsGet(qemuCaps, - QEMU_CAPS_MACH_VIRT_GIC_= VERSION); + bool hasGICVersionOption =3D virQEMUCapsGetArch(qemuCaps) =3D=3D V= IR_ARCH_AARCH64; switch ((virGICVersion) def->gic_version) { case VIR_GIC_VERSION_2: --=20 2.39.2