lkml.org 
[lkml]   [2024]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 02/16] KVM: x86/mmu: Introduce a slot flag to zap only slot leafs on slot deletion
From

>>
>> You had said up the thread, why not opt all non-normal VMs into the new
>> behavior. It will work great for TDX. But why do SEV and others want this
>> automatically?
>
> Because I want flexibility in KVM, i.e. I want to take the opportunity to try and
> break away from KVM's godawful ABI. It might be a pipe dream, as keying off the
> VM type obviously has similar risks to giving userspace a memslot flag. The one
> sliver of hope is that the VM types really are quite new (though less so for SEV
> and SEV-ES), whereas a memslot flag would be easily applied to existing VMs.

Btw, does the "zap-leaf-only" approach always have better performance,
assuming we have to hold MMU write lock for that?

Consider a huge memslot being deleted/moved.

If we can always have a better performance for "zap-leaf-only", then
instead of letting userspace to opt-in this feature, we perhaps can do
the opposite:

We always do the "zap-leaf-only" in KVM, but add a quirk for the VMs
that userspace know can have such bug and apply this quirk.

But again, I think it's just too overkill for TDX. We can just set the
ZAP_LEAF_ONLY flag for the slot when it is created in KVM.

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