Re: [PATCH 02/16] KVM: x86/mmu: Introduce a slot flag to zap only slot leafs on slot deletion

Paolo Bonzini
2024-05-17T15:27:37Z

On 5/15/24 22:05, Sean Christopherson wrote:
>> Again thinking of the userspace memory analogy... Aren't there some VMs where
>> the fast zap is faster? Like if you have guest with a small memslot that gets
>> deleted all the time, you could want it to be zapped specifically. But for the
>> giant memslot next to it, you might want to do the fast zap all thing.
>
> Yes. But...

On the other hand, tearing down a giant memslot isn't really common.
The main occurrence of memslots going away is 1) BIOS fiddling with low
memory permissions; 2) PCI BARs. The former is only happening at boot
and with small memslots, the latter can in principle involve large
memslots but... just don't do it.

Paolo