[PATCH v5 09/19] fixmap: Pass down the full phys address for set_fixmap_io
Catalin Marinas
catalin.marinas at arm.com
Mon Aug 26 03:05:56 PDT 2024
On Mon, Aug 19, 2024 at 02:19:14PM +0100, Steven Price wrote:
> From: Suzuki K Poulose <suzuki.poulose at arm.com>
>
> For early I/O mapping using fixmap, we mask the address by PAGE_MASK
> base and then map it to the FIXMAP slot. However, with confidential
> computing, the granularity at which "protections" (encrypted vs
> decrypted) are applied may be finer than the PAGE_SIZE. e.g., for Arm
> CCA it is 4K while an arm64 kernel could be using 64K pagesize. However
> we need to know the exact address being mapped in.
>
> Thus in-order to calculate the accurate protection, pass down the exact
> phys address to the helpers. This would be later used by arm64 to detect
> if the MMIO address is shared vs protected. The users of such drivers
> already cope with running the same code with "4K" page size, thus
> mapping a PAGE_SIZE covering the address range is considered acceptable.
>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> Signed-off-by: Steven Price <steven.price at arm.com>
Will was keen (and I'd prefer it as well) to get rid of the early fixmap
code, at least for the time being. Have you tried without these and the
early RSI probing?
Apart from the earlycon I recall you mentioned EFI early maps. These
would be more problematic.
--
Catalin
More information about the linux-arm-kernel
mailing list