From nobody Wed Jan 15 12:09:21 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=1684234471; cv=none; d=zohomail.com; s=zohoarc; b=D2tg69nG17xU6pzurhzgvdJkL2WcvX7JPOTDBp3Yo6zoWggBa1Rig7NSXaib3Fmm8HVxzw5tEhnAnHxYFj6a1i5ffTnpXKSinzT41ZsWu58Bp1LRiXV5hJCpfWwmbCFJNJf1XqYMoKqHGW50aJHppLb4M2GlmwQGR70mNyU+SJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684234471; 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=4mjp/yyPLz3LOhQAy3r2yCwIsikOG3CuOl2RuKb5jmw=; b=ZgO4jmDPjtzthGb0Np8PwyjTVke7tWZ1Hdo46gv9ITHHsRDMk48nPPFknu2w4r2ZyoTmocn24FqYdi7xo0T0oKWro8M+ZlHS06eu4ceRZ7eJjCEX0FTH7p25EhvAk6VKsGVjygmYyFsQNn+WSYOBF5GyKq+VgGIbzmEUI4vnX7U= 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 168423447149472.96891825401906; Tue, 16 May 2023 03:54:31 -0700 (PDT) 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-619-EvpfCONKOHu00mZb7CG4zA-1; Tue, 16 May 2023 06:54:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59275852647; 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 4672020239E2; 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 980FA19465B1; 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 31F7519465B3 for ; Tue, 16 May 2023 10:54:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 188522026D25; Tue, 16 May 2023 10:54:20 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B464F2026D16 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=1684234470; 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=4mjp/yyPLz3LOhQAy3r2yCwIsikOG3CuOl2RuKb5jmw=; b=CFcyJlw5QyxeltUlHGOWa11NNC+xZGcjbbx57SBlNjJurAPyA4H8M+BXXYuVCEF+dg4zH7 82IF/wP32W0MO9Pw4qZu7OEOhAdinKitYxsXlDMT78TjdVO6sqpRWQPRIULzwAwnR+0+KG m/lD8W5MRjCFzSXDEdnafuPvHf0qDH4= X-MC-Unique: EvpfCONKOHu00mZb7CG4zA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 4/4] qemu: Generate command line for MTE feature Date: Tue, 16 May 2023 12:54:16 +0200 Message-Id: <36923726820280a6e2868cbc30ed87f6773fe869.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.4 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: 1684234472995100007 Content-Type: text/plain; charset="utf-8"; x-default="true" This is pretty trivia, just append "mte=3Don/off" to -machine arguments. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 6 ++++++ tests/qemuxml2argvdata/aarch64-gic-v3.args | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2a6d9408f6..9b993c3aad 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6797,6 +6797,12 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf, virBufferAsprintf(buf, ",cap-ibs=3D%s", str); } =20 + if (def->features[VIR_DOMAIN_FEATURE_MTE] !=3D VIR_TRISTATE_SWITCH_ABS= ENT) { + const char *str; + str =3D virTristateSwitchTypeToString(def->features[VIR_DOMAIN_FEA= TURE_MTE]); + virBufferAsprintf(buf, ",mte=3D%s", str); + } + return 0; } =20 diff --git a/tests/qemuxml2argvdata/aarch64-gic-v3.args b/tests/qemuxml2arg= vdata/aarch64-gic-v3.args index 0d7a1c259a..0244951d87 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-v3.args +++ b/tests/qemuxml2argvdata/aarch64-gic-v3.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -name guest=3Daarch64test,debug-threads=3Don \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ --machine virt,usb=3Doff,gic-version=3D3,dump-guest-core=3Doff,memory-backe= nd=3Dmach-virt.ram \ +-machine virt,usb=3Doff,gic-version=3D3,mte=3Don,dump-guest-core=3Doff,mem= ory-backend=3Dmach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ --=20 2.39.3