Re: [RFC PATCH v5 023/104] x86/cpu: Add helper functions to allocate/free MKTME keyid

From: Kai Huang
Date: Wed Apr 06 2022 - 21:00:55 EST


>
> >
> > Also export the global TDX private host key id that is used to encrypt TDX
> > module, its memory and some dynamic data (e.g. TDR).  
> >

Sorry I was replying too quick.

This sentence is not correct. Hardware doesn't use global KeyID to encrypt TDX
module itself. In current generation of TDX, global KeyID is used to encrypt
TDX memory metadata (PAMTs) and TDRs.


> > When VMM releasing
> > encrypted page to reuse it, the page needs to be flushed with the used host
> > key id. VMM needs the global TDX private host key id to flush such pages
> > TDX module accesses with the global TDX private host key id.
> >
> >
>
> Find to me.
>