Re: [PATCH v2 32/58] i386/tdx: Track RAM entries for TDX VM

2023-08-22 Thread Xiaoyao Li
On 8/22/2023 7:40 AM, Isaku Yamahata wrote: On Fri, Aug 18, 2023 at 05:50:15AM -0400, Xiaoyao Li wrote: diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h index e9d2888162ce..9b3c427766ef 100644 --- a/target/i386/kvm/tdx.h +++ b/target/i386/kvm/tdx.h @@ -15,6 +15,17 @@ typedef struct

Re: [PATCH v2 32/58] i386/tdx: Track RAM entries for TDX VM

2023-08-22 Thread Xiaoyao Li
On 8/21/2023 5:38 PM, Daniel P. Berrangé wrote: diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c index bb806736b4ff..ed617ebab266 100644 --- a/target/i386/kvm/tdx.c +++ b/target/i386/kvm/tdx.c +static int tdx_accept_ram_range(uint64_t address, uint64_t length) +{ +uint64_t

Re: [PATCH v2 32/58] i386/tdx: Track RAM entries for TDX VM

2023-08-21 Thread Isaku Yamahata
On Fri, Aug 18, 2023 at 05:50:15AM -0400, Xiaoyao Li wrote: > diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h > index e9d2888162ce..9b3c427766ef 100644 > --- a/target/i386/kvm/tdx.h > +++ b/target/i386/kvm/tdx.h > @@ -15,6 +15,17 @@ typedef struct TdxGuestClass { >

Re: [PATCH v2 32/58] i386/tdx: Track RAM entries for TDX VM

2023-08-21 Thread Daniel P . Berrangé
On Fri, Aug 18, 2023 at 05:50:15AM -0400, Xiaoyao Li wrote: > The RAM of TDX VM can be classified into two types: > > - TDX_RAM_UNACCEPTED: default type of TDX memory, which needs to be >accepted by TDX guest before it can be used and will be all-zeros >after being accepted. > > -

[PATCH v2 32/58] i386/tdx: Track RAM entries for TDX VM

2023-08-18 Thread Xiaoyao Li
The RAM of TDX VM can be classified into two types: - TDX_RAM_UNACCEPTED: default type of TDX memory, which needs to be accepted by TDX guest before it can be used and will be all-zeros after being accepted. - TDX_RAM_ADDED: the RAM that is ADD'ed to TD guest before running, and can