From nobody Wed Jan 15 11:57:57 2025 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=1684234504; cv=none; d=zohomail.com; s=zohoarc; b=ElzlQtYGbrFphNWh4kLs/y/XQEOzGMevjPtYQaI0CAHw+vXIkBmpUVSKdmMH7ox1ndcESmXa69/S/yJS/ooQjF+XYFwMs2pT/KveIsn0dh70h11qe/79VPUlCS1OITtxbgR48Lu9rV8DGgnyvsAS+llRm7Pt9g1WsbCW2URO/G4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684234504; 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=QGijerk9eHI0p2B+GwLbvmzaTank/FsveSMUASp92yo=; b=A1wEAttFjgRj4ubChL0kDulAlM5+7O1WYRtaBgZb0Z4AqrG9cwd1D/HZeffjUQicvd2eDAG8z4qRRMG/UVvI3xLuXnz/dmUrptEWUb8w14lPCe/zt9GEx75V8pA+3h/fJy7uQcSUhEm1bzirdUH1FB40KHIxNT+VYkh+r7Ej5rY= 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 168423450430214.041360917900079; Tue, 16 May 2023 03:55:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-80-AoDEq3RiMYmIKKl677_PFw-1; Tue, 16 May 2023 06:54:26 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FD6A280AA50; Tue, 16 May 2023 10:54:22 +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 3784214171C1; Tue, 16 May 2023 10:54:22 +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 93BA819465A3; Tue, 16 May 2023 10:54:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8859E1946595 for ; Tue, 16 May 2023 10:54:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7D2A22026D25; Tue, 16 May 2023 10:54:19 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 246062026D16 for ; Tue, 16 May 2023 10:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684234503; 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=QGijerk9eHI0p2B+GwLbvmzaTank/FsveSMUASp92yo=; b=atYll7wGakvHZeBxs8NSdiqDRMIZJTHze3+lPHyUsXNVTNSZRNgWNwgeg9SymMJ6Z4oLfU DqmXKcuyI/jgBiXxW9asMMBiD9tZesWHXTa/s9HUiXX+U3ApNXRAPDqLrJgoT1l46E5MG0 jYOcOnU6YDM4qU//uLjS4ouq/hG756E= X-MC-Unique: AoDEq3RiMYmIKKl677_PFw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/4] qemu: Validate MTE feature Date: Tue, 16 May 2023 12:54:15 +0200 Message-Id: <693cf04b99d5298ba6ae4116b26f5466ec38be37.1684234431.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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.7 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: 1684234504887100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The MTE feature is not supported by all QEMUs, only those with QEMU_CAPS_MACHINE_VIRT_MTE capability. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 99c7775e9b..aec1801672 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -124,14 +124,23 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, =20 case VIR_DOMAIN_FEATURE_GIC: case VIR_DOMAIN_FEATURE_MTE: - if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON && - !qemuDomainIsARMVirt(def)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%1$s' feature is not supported for = architecture '%2$s' or machine type '%3$s'"), - featureName, - virArchToString(def->os.arch), - def->os.machine); - return -1; + if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) { + if (!qemuDomainIsARMVirt(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("The '%1$s' feature is not supported = for architecture '%2$s' or machine type '%3$s'"), + featureName, + virArchToString(def->os.arch), + def->os.machine); + return -1; + } + + if (i =3D=3D VIR_DOMAIN_FEATURE_MTE && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_VIRT_MTE))= { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("The '%1$s' feature is not supported = with this QEMU binary"), + featureName); + return -1; + } } break; =20 --=20 2.39.3