lkml.org 
[lkml]   [2023]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand
From
On 7/4/23 09:58, Peter Zijlstra wrote:
> If we have concerns about allocating the PAMT array, can't we use CMA
> for this? Allocate the whole thing at boot as CMA such that when not
> used for TDX it can be used for regular things like userspace and
> filecache pages?

I never thought of CMA as being super reliable. Maybe it's improved
over the years.

KVM also has a rather nasty habit of pinning pages, like for device
passthrough. I suspect that means that we'll have one of two scenarios:

1. CMA works great, but the TDX/CMA area is unusable for KVM because
it's pinning all its pages and they just get moved out of the CMA
area immediately. The CMA area is effectively wasted.
2. CMA sucks, and users get sporadic TDX failures when they wait a long
time to run a TDX guest after boot. Users just work around the CMA
support by starting up TDX guests at boot or demanding a module
parameter be set. Hacking in CMA support was a waste.

Am I just too much of a pessimist?

\
 
 \ /
  Last update: 2023-07-05 16:36    [W:0.367 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site