Re: [PATCH V10 08/44] Documentation/pkeys: Add initial PKS documentation

From: Kees Cook
Date: Mon May 09 2022 - 18:03:56 EST


On Tue, Apr 19, 2022 at 10:06:13AM -0700, ira.weiny@xxxxxxxxx wrote:
> From: Ira Weiny <ira.weiny@xxxxxxxxx>
>
> Add initial overview and configuration information about PKS.
>
> Cc: "Moger, Babu" <Babu.Moger@xxxxxxx>
> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
>
> ---
> Changes for V9
> Feedback from Dave Hansen
> Remove overview and move relevant text to the main pkey
> overview which covers both user ans kernel keys.
> Add an example of using Kconfig
> Move MSR details to later patches
> ---
> Documentation/core-api/protection-keys.rst | 43 ++++++++++++++++++++--
> 1 file changed, 39 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/core-api/protection-keys.rst b/Documentation/core-api/protection-keys.rst
> index bf28ac0401f3..13eedb0119e1 100644
> --- a/Documentation/core-api/protection-keys.rst
> +++ b/Documentation/core-api/protection-keys.rst
> @@ -13,6 +13,11 @@ Pkeys Userspace (PKU) is a feature which can be found on:
> * Intel client CPUs, Tiger Lake (11th Gen Core) and later
> * Future AMD CPUs
>
> +Protection Keys Supervisor (PKS) is a feature which can be found on:
> + * Sapphire Rapids (and later) "Scalable Processor" Server CPUs
> + * Future non-server Intel parts.
> + * qemu: https://www.qemu.org/2021/04/30/qemu-6-0-0/

It looks like QEMU has pass-through support, but not emulation? It'd be
really nice to have this feature emulated so it would be possible to
test the code. (Or I need to find a machine that supports this...)

--
Kees Cook