Re: [RFC] KVM: mm: fd-based approach for supporting KVM guest private memory

From: Dave Hansen
Date: Wed Sep 01 2021 - 15:26:14 EST


On 9/1/21 9:18 AM, James Bottomley wrote:
>> So I think there are literally zero code paths that currently call
>> try_to_unmap() that will actually work like that on TDX. If we run
>> out of memory on a TDX host, we can kill the guest completely and
>> reclaim all of its memory (which probably also involves killing QEMU
>> or whatever other user program is in charge), but that's really our
>> only option.
> I think our only option for swap is guest co-operation.

Yes, today that's the only choice. Both TDX and SEV-SNP can
*theoretically* extend their architectures to enable swap with
uncooperative guests. But, frankly, nobody has been asking for it.

If you care, please ask Intel and AMD to fix this gap.