From patchwork Fri May 20 12:38:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12856760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FD46C433F5 for ; Fri, 20 May 2022 12:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SEXzFX5LXmfUE8ZVBpvI4+H8o5LmE7ecAq/6dsmPC0s=; b=NK88xEixpr8/XF GxFPIwNPn1u2SNeS2bnYmApediMPA31lrFS3ayKJZeroS+oLaCRNdkdnEDKRG+UEppibPbxkL2ze7 BnLNSw47cXd6GKFrHFzcT4NmKBfIQjqv8koXLw+XIjtAOj96fkf66/s8M6Gmg2isdZNGBsK0IVFJ/ xw4x0+Q0iVW9VhxUCn+ByfGu+L+Ny40zPOhjgKmLIKvcTiXr5TXJO/+EoQ3X1ibX0kR0WJewXLU/1 cdyqYfGw5mcFpNjtfwiR2jbbnu1npJLcif/eLwI/zzrBpbyAhqBGuQAQOzUzu3u6IrL0n8eNb0DLl sS2eFB7+xPs+/WOGCM1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns1uJ-00CNTf-Oo; Fri, 20 May 2022 12:39:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns1uG-00CNRe-5Z for linux-arm-kernel@lists.infradead.org; Fri, 20 May 2022 12:39:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2273F1477; Fri, 20 May 2022 05:38:56 -0700 (PDT) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4742E3F718; Fri, 20 May 2022 05:38:55 -0700 (PDT) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: alexandru.elisei@arm.com, will@kernel.org, maz@kernel.org Subject: [PATCH kvmtool] aarch64: Give up with MTE for AArch32 guest Date: Fri, 20 May 2022 13:38:44 +0100 Message-Id: <20220520123844.127733-1-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_053900_318755_AAEDDED6 X-CRM114-Status: UNSURE ( 6.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org KVM doesn't support combination of MTE and AArch32 guest, so do not even try. Signed-off-by: Vladimir Murzin Tested-by: Alexandru Elisei Reviewed-by: Alexandru Elisei --- arm/aarch64/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c index 1b992dd..f3fe854 100644 --- a/arm/aarch64/kvm.c +++ b/arm/aarch64/kvm.c @@ -120,6 +120,11 @@ void kvm__arch_enable_mte(struct kvm *kvm) .cap = KVM_CAP_ARM_MTE, }; + if (kvm->cfg.arch.aarch32_guest) { + pr_debug("MTE is incompatible with AArch32"); + return; + } + if (kvm->cfg.arch.mte_disabled) { pr_debug("MTE disabled by user"); return;