Re: [PATCH v8 11/16] x86/virt/tdx: Designate reserved areas for all TDMRs

From: Dave Hansen
Date: Tue Jan 10 2023 - 10:30:31 EST


On 1/10/23 03:01, Huang, Kai wrote:
> On Tue, 2023-01-10 at 01:19 +0000, Huang, Kai wrote:
>>> I think the -E2BIG is also wrong.  It should be ENOSPC.  I'd also add a
>>> pr_warn() there.  Especially with how lazy this whole thing is, I can
>>> start to see how the reserved areas might be exhausted.  Let's be kind
>>> to our future selves and make the error (and the fix) easier to find.
>> Yes agreed.  Will change to -ENOSPC and add pr_warn().
> Btw, in patch ("x86/virt/tdx: Fill out TDMRs to cover all TDX memory regions"),
> when there are too many TDMRs, I suppose I should also return -ENOSPC instead of
> -E2BIG?

Yes.