Re: [RFC PATCH 1/6] x86/virt/tdx: Add SEAMCALL wrappers for TDX KeyID management

Edgecombe, Rick P
2024-11-27T23:04:51Z

On Wed, 2024-11-27 at 19:15 +0100, Paolo Bonzini wrote:
> > What if we just move these members from hpa_t to pfn_t? It keeps us off
> > struct
> > page, but addresses some of Dave's concerns about hpa_t looking like a
> > specific
> > address.
>
> For tdr I agree with Dave that you probably want a struct which stores
> the struct page*. Currently the code is using __get_free_page(), but
> it's a small change to have it use alloc_page() instead, and
> __free_page() instead of free_page().
>
> The only difference on the arch/x86/virt/ side is a bunch of added
> page_to_phys().

Thanks.

>
> Anyhow, whatever you post I'll take care of adjusting in the KVM patches.

I'm just throwing together a v2. We have the US holidays this week, so it may be
Monday.