Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp178083lqr; Wed, 5 Jun 2024 02:41:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlN2iYLB+qK6PQ2Ehw3S3JNDdEpcP3JsBpWzYovhe/IsmRpWTANmPwW9Fyi41xHXEA542jBucmIhdOVL39V0k9wQB2BBQcB85YCXbKBQ== X-Google-Smtp-Source: AGHT+IF8LP7swFjkKSNJNtqTMuKdCSiV9l1M47b++diz0CfXDMmZuE+yoDEkg2i131KDTDlmMyXe X-Received: by 2002:a05:6a20:d80d:b0:1af:881c:e924 with SMTP id adf61e73a8af0-1b2b763736fmr2285902637.62.1717580501924; Wed, 05 Jun 2024 02:41:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717580501; cv=pass; d=google.com; s=arc-20160816; b=zwYkZsKKeI3c0P5PnaX2rkVCN6j7du4zvqWaIXz9APDtCaawPegK+JD0zgOLsBxhuZ NLuXzSP84R8ExMsS/YcWBVQMOXUx79SRrHTlWhBCuc4RXHQisQn1Xcu8dhs7n2icWdtF xJnbgWC+CC3KUMGGi4rPjz+BZsQ4nDLE3NVzh+6KDaUpJEHJGt7RO+9lnVgJDzfXrsze 4HvJwLmlmyvdivz0QgS8ogCDXmP/q+pqhVPRDtSe6QqRjSf7GPp5wwLBKRM/or+wW10/ x9OL8Q3Q6rLSmLSuwrYbYXP/1GpkNHEWOTe0IdZznRCQQpGhlsdxeS2A7C6yBTAX1Diz hQxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=gQvQCUnk1FGPvH3B9LLw6tnL1CgwZPXEd5Z0HKJliVs=; fh=mU6xl5FN63PgqIKyLHx/u5uRervM0V89cYoVjXl22Bs=; b=OECOJvFHXrjmfCGbxtXJQzxBuhHpDtcok1lC9+cmXWKuGTOMoRO43uSKagpAxJup5N GrYilZmLhJ5tIQIb8PrVYHTkeGzRuVbz0nl98egBjQSmBY68i3sWMa+7YpyQ8jKUm3AY rAZ/68V0gPCjrI2wSi/HzqzsVzUOR0ETXGnwbSZnERFCakJiFvhkvGXnc32HZjdG11Bo Ni9py3nRjabxb0AChOGXACl7CdIeq1J8ffayYO3AgVKq7o6VJfdFoqxcNl4IkGeGOvbF 3/GqjBYWsBa5GmgX4bkri6QUoFDV5IemfhTw24eyuHxsa+i4vzC4uHkHPySUq7WX/YNZ dwWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7026446fa38si3848433b3a.190.2024.06.05.02.41.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:41:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 002D12847B1 for ; Wed, 5 Jun 2024 09:35:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34F56195FF2; Wed, 5 Jun 2024 09:31:04 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E5A3194A79; Wed, 5 Jun 2024 09:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579863; cv=none; b=fFrKZntCDgGSQlrtUAHb1uKBN+9T4KtTL4oA2QLBWtN3ypPdScYyn8JkGOtgootn7SLN6gtWSk4jioAl2gWs5jM/1EGUoWwrvXBmFIf3bZb/ZiqhnHHgyFnUpQ6Jyn8m/l44H0qIVmqQQbEWPs3P8+bvEg9XVyA6fftrpIoQY0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579863; c=relaxed/simple; bh=szWOUfh6Wnhb99hxcGdoM94GZ2H3nOJmLRprWEn9pKw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UYANVcoHm0vFp1ZITwzhFBzzHQq5bA6JZzNVx6NrG7HzVjh1LEQnwbJ939hwss4wlOtYqzMJ+Df1Q4J5z3iLjdk/0vSJHgY0Dzy+5AI4QkFMblTzG47Djc8R4BJ/YyUqG/XUPVfQTYLgMHiN1WO2wikdfKjs+T+c4rhvjbBvdE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 905961063; Wed, 5 Jun 2024 02:31:26 -0700 (PDT) Received: from e122027.arm.com (unknown [10.57.39.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3D38C3F792; Wed, 5 Jun 2024 02:30:59 -0700 (PDT) From: Steven Price To: kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: Suzuki K Poulose , Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Steven Price Subject: [PATCH v3 11/14] efi: arm64: Map Device with Prot Shared Date: Wed, 5 Jun 2024 10:30:03 +0100 Message-Id: <20240605093006.145492-12-steven.price@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605093006.145492-1-steven.price@arm.com> References: <20240605093006.145492-1-steven.price@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 4a92096db34e..ae1ccc8852a4 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -34,7 +34,7 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md) u32 type = md->type; if (type == EFI_MEMORY_MAPPED_IO) - return PROT_DEVICE_nGnRE; + return PROT_NS_SHARED | PROT_DEVICE_nGnRE; if (region_is_misaligned(md)) { static bool __initdata code_is_misaligned; -- 2.34.1