From nobody Sun Sep 14 03:51:53 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88DE6C38142 for ; Fri, 27 Jan 2023 11:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232566AbjA0Lao (ORCPT ); Fri, 27 Jan 2023 06:30:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233496AbjA0L36 (ORCPT ); Fri, 27 Jan 2023 06:29:58 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB6DA78AF2 for ; Fri, 27 Jan 2023 03:29:05 -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 5DCAB168F; Fri, 27 Jan 2023 03:29:24 -0800 (PST) Received: from e122027.cambridge.arm.com (e122027.cambridge.arm.com [10.1.35.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27EEF3F8D6; Fri, 27 Jan 2023 03:28:40 -0800 (PST) From: Steven Price To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: Steven Price , Catalin Marinas , Ard Biesheuvel , Marc Zyngier , Will Deacon , Suzuki K Poulose , James Morse , Oliver Upton , Zenghui Yu , linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev Subject: [RFC PATCH 12/14] efi: arm64: Map Device with Prot Shared Date: Fri, 27 Jan 2023 11:27:56 +0000 Message-Id: <20230127112758.37891-13-steven.price@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127112758.37891-1-steven.price@arm.com> References: <20230127112248.136810-1-suzuki.poulose@arm.com> <20230127112758.37891-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Suzuki K Poulose Device mappings need to be emualted by the VMM so must be mapped shared with the host. Signed-off-by: Suzuki K Poulose Signed-off-by: Steven Price --- arch/arm64/kernel/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index fab05de2e12d..03a876707fc5 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -31,7 +31,7 @@ static __init pteval_t create_mapping_protection(efi_memo= ry_desc_t *md) u32 type =3D md->type; =20 if (type =3D=3D EFI_MEMORY_MAPPED_IO) - return PROT_DEVICE_nGnRE; + return PROT_NS_SHARED | PROT_DEVICE_nGnRE; =20 if (region_is_misaligned(md)) { static bool __initdata code_is_misaligned; --=20 2.34.1