From: Steven Price <steven.price@arm.com>
To: Will Deacon <will@kernel.org>
Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev,
Catalin Marinas <catalin.marinas@arm.com>,
Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
Oliver Upton <oliver.upton@linux.dev>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Joey Gouly <joey.gouly@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Christoffer Dall <christoffer.dall@arm.com>,
Fuad Tabba <tabba@google.com>,
linux-coco@lists.linux.dev,
Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Subject: Re: [PATCH v4 04/15] arm64: realm: Query IPA size from the RMM
Date: Wed, 10 Jul 2024 16:34:15 +0100 [thread overview]
Message-ID: <b6dc6c3a-cbf1-406f-a885-48eebf0c3d78@arm.com> (raw)
In-Reply-To: <20240709105325.GF12978@willie-the-truck>
On 09/07/2024 11:53, Will Deacon wrote:
> On Mon, Jul 01, 2024 at 10:54:54AM +0100, Steven Price wrote:
>> The top bit of the configured IPA size is used as an attribute to
>> control whether the address is protected or shared. Query the
>> configuration from the RMM to assertain which bit this is.
>>
>> Co-developed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> Signed-off-by: Steven Price <steven.price@arm.com>
>> ---
>> Changes since v2:
>> * Drop unneeded extra brackets from PROT_NS_SHARED.
>> * Drop the explicit alignment from 'config' as struct realm_config now
>> specifies the alignment.
>> ---
>> arch/arm64/include/asm/pgtable-prot.h | 3 +++
>> arch/arm64/kernel/rsi.c | 8 ++++++++
>> 2 files changed, 11 insertions(+)
>>
>> diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h
>> index b11cfb9fdd37..6c29f3b32eba 100644
>> --- a/arch/arm64/include/asm/pgtable-prot.h
>> +++ b/arch/arm64/include/asm/pgtable-prot.h
>> @@ -70,6 +70,9 @@
>> #include <asm/pgtable-types.h>
>>
>> extern bool arm64_use_ng_mappings;
>> +extern unsigned long prot_ns_shared;
>> +
>> +#define PROT_NS_SHARED (prot_ns_shared)
>
> Since the _vast_ majority of Linux systems won't be running in a realm,
> can we use a static key to avoid loading a constant each time?
Fair enough, the following should do the trick:
#define PROT_NS_SHARED (is_realm_world() ? prot_ns_shared : 0)
Thanks,
Steve
next prev parent reply other threads:[~2024-07-10 15:34 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 9:54 [PATCH v4 00/15] arm64: Support for running as a guest in Arm CCA Steven Price
2024-07-01 9:54 ` [PATCH v4 01/15] arm64: rsi: Add RSI definitions Steven Price
2024-07-09 5:19 ` Gavin Shan
2024-07-10 15:34 ` Steven Price
2024-07-23 5:35 ` Gavin Shan
2024-07-23 6:22 ` Gavin Shan
2024-08-16 15:56 ` Steven Price
2024-07-01 9:54 ` [PATCH v4 02/15] firmware/psci: Add psci_early_test_conduit() Steven Price
2024-07-09 10:48 ` Will Deacon
2024-07-10 15:34 ` Steven Price
2024-07-01 9:54 ` [PATCH v4 03/15] arm64: Detect if in a realm and set RIPAS RAM Steven Price
2024-07-29 23:37 ` Gavin Shan
2024-07-30 13:51 ` Suzuki K Poulose
2024-07-31 7:03 ` Gavin Shan
2024-07-31 9:05 ` Suzuki K Poulose
2024-07-01 9:54 ` [PATCH v4 04/15] arm64: realm: Query IPA size from the RMM Steven Price
2024-07-09 10:53 ` Will Deacon
2024-07-10 15:34 ` Steven Price [this message]
2024-07-01 9:54 ` [PATCH v4 05/15] arm64: Mark all I/O as non-secure shared Steven Price
2024-07-09 11:39 ` Will Deacon
2024-07-09 12:54 ` Suzuki K Poulose
2024-07-10 15:34 ` Steven Price
2024-07-30 1:36 ` Gavin Shan
2024-07-30 10:36 ` Suzuki K Poulose
2024-07-31 6:36 ` Gavin Shan
2024-07-31 9:03 ` Suzuki K Poulose
2024-07-01 9:54 ` [PATCH v4 06/15] arm64: Make the PHYS_MASK_SHIFT dynamic Steven Price
2024-07-09 11:43 ` Will Deacon
2024-07-09 12:55 ` Suzuki K Poulose
2024-07-10 15:34 ` Steven Price
2024-07-01 9:54 ` [PATCH v4 07/15] arm64: Enforce bounce buffers for realm DMA Steven Price
2024-07-09 11:56 ` Will Deacon
2024-07-10 15:43 ` Steven Price
2024-07-01 9:54 ` [PATCH v4 08/15] arm64: mm: Avoid TLBI when marking pages as valid Steven Price
2024-07-09 11:57 ` Will Deacon
2024-07-10 16:04 ` Steven Price
2024-07-01 9:54 ` [PATCH v4 09/15] arm64: Enable memory encrypt for Realms Steven Price
2024-07-01 9:55 ` [PATCH v4 10/15] arm64: Force device mappings to be non-secure shared Steven Price
2024-07-01 9:55 ` [PATCH v4 11/15] efi: arm64: Map Device with Prot Shared Steven Price
2024-07-01 9:55 ` [PATCH v4 12/15] irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor Steven Price
2024-07-10 13:17 ` Will Deacon
2024-07-01 9:55 ` [PATCH v4 13/15] irqchip/gic-v3-its: Rely on genpool alignment Steven Price
2024-07-10 13:17 ` Will Deacon
2024-07-01 9:55 ` [PATCH v4 14/15] arm64: rsi: Interfaces to query attestation token Steven Price
2024-07-01 9:55 ` [PATCH v4 15/15] virt: arm-cca-guest: TSM_REPORT support for realms Steven Price
2024-07-09 12:04 ` [PATCH v4 00/15] arm64: Support for running as a guest in Arm CCA Will Deacon
2024-07-12 8:54 ` Matias Ezequiel Vara Larsen
2024-08-15 22:16 ` Shanker Donthineni
2024-08-16 16:06 ` Steven Price
2024-08-16 21:13 ` Shanker Donthineni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6dc6c3a-cbf1-406f-a885-48eebf0c3d78@arm.com \
--to=steven.price@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@arm.com \
--cc=gankulkarni@os.amperecomputing.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).