Message ID | 20230127113932.166089-2-suzuki.poulose@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp787269wrn; Fri, 27 Jan 2023 03:43:54 -0800 (PST) X-Google-Smtp-Source: AK7set9u69bBJQ1nA7tCa7GByhTjSwF419YGZRfleuGRCEg3nwx12AE04mRLJSBceEcy89IEAkex X-Received: by 2002:a17:90b:4c52:b0:22c:46a1:67ca with SMTP id np18-20020a17090b4c5200b0022c46a167camr2651078pjb.37.1674819834175; Fri, 27 Jan 2023 03:43:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674819834; cv=none; d=google.com; s=arc-20160816; b=TDR5FF5zZnka70XksWlRjWTILkk0DsdTqlCvsT+WpdBz2j2H/wX9W4Jxh0muLEbBE6 8UyX5X9/gjbl0hLMYk0B8x2/6lcHQ/7yRv5gnDlEVHdL4qagg9pdf9ZLtZ2oUphOMoOb SltP6J/UV7i0sn5XiTtpCukyNOSo/1IIy2uPJ+glyilEOZwWCDnokZus4G8TlQBDwoVv nErHaXjIGd1xA7plW4GpE4R5ukF+0vqaogsUA1IqtL42xNH39fOLpgzX2ejcQTPUHNNt q7egLhlhAzegORBQh2c+BfiL5m9B7Z42/Vh6Kyu9/ICm/GXlUkKcESoCc3QXYTf9qgKv xxbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ia8hhE7WXst822ROUVg6x4qIQ7YANAOPdASZThWEqx0=; b=h6/QR8VncPpwMRuZQTCYo/jlr6TMaeCvNNeEN6BwVXmVLBBsVgvJllftKANxc6oBx9 Udz441o1OhJfDqsBIFXXcq8LjNu16EN0sNBTJKqICyflYcCWPKXRT3x5ijpY+k0ysxLd UE+GopcroPGc2dT/4lBrrGdFFRfXUVghTCJI7dunl07ql1LenlB6t41Mel75Z2H88KbE f3OijKxx89IUFM9eyuAZYyM1jreTgMTtEupqPpkY9vxUfNgY2vNIpICH+5QRdqx+Sbbx jdWfXdmIyXg7vkGB+FVKYsojOEvitWRgq3Kni4/YNEfYS+mXh7I29GIxR73kZU2F8LqP saZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c191-20020a6335c8000000b004de69e905d1si3989175pga.570.2023.01.27.03.43.41; Fri, 27 Jan 2023 03:43:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233766AbjA0Lkq (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Fri, 27 Jan 2023 06:40:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234143AbjA0Lkf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Jan 2023 06:40:35 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C14D70D54; Fri, 27 Jan 2023 03:40:15 -0800 (PST) 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 A44601576; Fri, 27 Jan 2023 03:40:33 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1E5433F64C; Fri, 27 Jan 2023 03:39:49 -0800 (PST) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: suzuki.poulose@arm.com, Alexandru Elisei <alexandru.elisei@arm.com>, Andrew Jones <andrew.jones@linux.dev>, Christoffer Dall <christoffer.dall@arm.com>, Fuad Tabba <tabba@google.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, Joey Gouly <Joey.Gouly@arm.com>, Marc Zyngier <maz@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Paolo Bonzini <pbonzini@redhat.com>, Quentin Perret <qperret@google.com>, Steven Price <steven.price@arm.com>, Thomas Huth <thuth@redhat.com>, Will Deacon <will@kernel.org>, Zenghui Yu <yuzenghui@huawei.com>, linux-coco@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC kvmtool 01/31] arm64: Disable MTE when CFI flash is emulated Date: Fri, 27 Jan 2023 11:39:02 +0000 Message-Id: <20230127113932.166089-2-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127113932.166089-1-suzuki.poulose@arm.com> References: <20230127112248.136810-1-suzuki.poulose@arm.com> <20230127113932.166089-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756175882377361999?= X-GMAIL-MSGID: =?utf-8?q?1756175882377361999?= |
Series |
arm64: Support for Arm Confidential Compute Architecture
|
|
Commit Message
Suzuki K Poulose
Jan. 27, 2023, 11:39 a.m. UTC
CFI Flash file image cannot be mapped into the memory of the
guest if MTE is enabled. Thus disable MTE if flash emulation
is requested.
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
arm/aarch64/kvm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c index 54200c9e..5a53badb 100644 --- a/arm/aarch64/kvm.c +++ b/arm/aarch64/kvm.c @@ -145,6 +145,12 @@ void kvm__arch_enable_mte(struct kvm *kvm) return; } + if (kvm->cfg.flash_filename) { + kvm->cfg.arch.mte_disabled = true; + pr_info("MTE is incompatible with CFI flash support, disabling"); + return; + } + if (kvm->cfg.arch.mte_disabled) { pr_debug("MTE disabled by user"); return;