Re: [PATCH 2/2] KVM: SEV: Fall back to __vmalloc() for SEV-ES scratch area if necessary

From: Paolo Bonzini
Date: Thu Nov 11 2021 - 07:52:15 EST


On 11/9/21 23:23, Sean Christopherson wrote:
The buffer is purely a KVM software construct, i.e. there's
no need for it to be physically contiguous, and at a max allowed size of
16kb it's just large enough that kzalloc() could feasibly fail due to
memory fragmentation.

That isn't entirely correct, as kzalloc() won't really fail for requests up to 32kb, i.e. order <= PAGE_ALLOC_COSTLY_ORDER. However, the reasoning is correct so I queued the patches.

Paolo