Re: [PATCHv6 26/30] x86/mm/cpa: Add support for TDX shared memory

From: Thomas Gleixner
Date: Thu Mar 17 2022 - 10:57:04 EST


On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote:

> Intel TDX protects guest memory from VMM access. Any memory that is
> required for communication with the VMM must be explicitly shared.
>
> It is a two-step process: the guest sets the shared bit in the page
> table entry and notifies VMM about the change. The notification happens
> using MapGPA hypercall.
>
> Conversion back to private memory requires clearing the shared bit,
> notifying VMM with MapGPA hypercall following with accepting the memory
> with AcceptPage hypercall.
>
> Provide a TDX version of x86_platform.guest.* callbacks. It makes
> __set_memory_enc_pgtable() work right in TDX guest.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>