Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp9794lql; Fri, 12 Apr 2024 01:46:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/2H6u0nZcYQeQxHF2h6HFSPZhMIY9KKbol7F10Fw1ERfqY2VY4h79E9shvCzcwRhgacnbLf95wCMP6xJMUps0NjIbD37uk2aobR+Z5Q== X-Google-Smtp-Source: AGHT+IEWiFEylX1z83fE+midyNflySH6XKUfTZt1xcoBd7gI6mjyOpJtZ3cFcirmPEg//WPq+jZI X-Received: by 2002:a05:6870:f10e:b0:22e:cd76:9cc3 with SMTP id k14-20020a056870f10e00b0022ecd769cc3mr2290595oac.29.1712911575797; Fri, 12 Apr 2024 01:46:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712911575; cv=pass; d=google.com; s=arc-20160816; b=tnddl1dxPB+gKbzBbKjQnjv7/IK/MdOsaaUyy79/xFcWWLx402s/0S/bzjcAft+pEq 1y08XAIk93hlLhCPsPvSig3YxnOIWJHqhiO2lAIBCRl+10n+iNW50aewDqc20tpk+8V8 JtvKh+ihbSmTH01w/Sx+Wk4opzMj4QY3kJnPagvVn3RSSjmmaIFmmBKEmfdcK8IUJnub kZPYDVCQEMSR/Z5LjK1KXiSpwoc7W0K3kby5QLoa6H+wMWlJlojY/4BxW4lcexQGshJ7 cSKm9uS2xoyYmxRvX51Rh2mp8vLP8iQYNHjLFp/jckAergKHTCRsbDcSmQKTxC0JOHU8 oXqg== 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=4m1QxoyCbdntTFbMnzESOm1EXBWQnNh2lfleNMuD9Rk=; fh=mU6xl5FN63PgqIKyLHx/u5uRervM0V89cYoVjXl22Bs=; b=h0WsN7mrVbj6oSU6Im5EAw8p39WBM9Scc81PNTsTvNq240fz+qMemrbZhhWk8bA+zj OBoQj9/1/SEwiU9MdhDu9LcE0JXFA5XYTlEVDaZ7LI4rNhrdsraphPT7Ap/6jukmZWb+ zhWIUc+cDOziLtpzCHKqCZX2+9gRhBPwWCOP302L9zxv12xje8jzyZL8v9vyKibc51w3 1gZNH/YRMaX+EfGSLzp+pw54AhgcAaRcBkyK7EaseKAna40sigwFwDgYeU+zqt3YDvzW zxdvLK4jKNJcvxS48hcfM0h3Zci6mk/45MdyPsRNCAyFHTjF7s5/UPlxKrFEndznvrFe ohdA==; 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-142264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142264-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 o12-20020a63f14c000000b005e83853c49csi2849796pgk.16.2024.04.12.01.46.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 01:46:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142264-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-142264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142264-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 73251284949 for ; Fri, 12 Apr 2024 08:46:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC7815821C; Fri, 12 Apr 2024 08:42:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7CFE56B7F; Fri, 12 Apr 2024 08:42:47 +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=1712911369; cv=none; b=M2Hps8gTwiILnNUeAoeSlCWqpQo/KFkzkjjHLGqU6C2YD4sTUHk49eKP5wZglcOcoTvmFGiqiUJLOzcstWZKVXhKhzvODUIEmFyQ0pr18VjDBZXiV0TdCReeXtrwilKZX9u4JbLf9+hk+wupilXisweSLbt89zq7rMwqvmbNrUI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712911369; c=relaxed/simple; bh=GQhBxJGntjJO/xCH8wTLpSUjcxPJpRPlPG7Yf0I+kCk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d0T0zancWucCsLA8t0UFkiyC3CxT0jl4Dwk71y2tr4VEiNsum/0vNFC3UZjRuFo2eqGNrMqfuk1Gd3ha0Tj+5/aVI5lMYA7ts22SIN722OPD7biKRtWbAXyYZQvAgwdaZ+WSXufU4m69KxtRPFfiaxjJ4cHpBXugb+o6/vwJUwo= 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 C9D38339; Fri, 12 Apr 2024 01:43:16 -0700 (PDT) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 726153F6C4; Fri, 12 Apr 2024 01:42:45 -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 v2 11/14] efi: arm64: Map Device with Prot Shared Date: Fri, 12 Apr 2024 09:42:10 +0100 Message-Id: <20240412084213.1733764-12-steven.price@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412084213.1733764-1-steven.price@arm.com> References: <20240412084056.1733704-1-steven.price@arm.com> <20240412084213.1733764-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 9afcc690fe73..bb8b39f16092 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -33,7 +33,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