[PATCH 0/2] KVM: x86/mmu: Minor cleanup in try_async_pf()
From: Sean Christopherson
Date: Wed Apr 15 2020 - 17:44:54 EST
Two cleanups with no functional changes.
I'm not 100% on whether or not open coding the private memslot check in
patch 2 is a good idea. Avoiding the extra memslot lookup is nice, but
that could be done by providing e.g. kvm_is_memslot_visible(). On one
hand, I like deferring the nonexistent and invalid checks to common code,
but on the other hand it creates the possibility of missing some future
case where kvm_is_gfn_visible() adds a check that's not also incoporated
into __gfn_to_hva_many(), though that seems like a rather unlikely
scenario.
Sean Christopherson (2):
KVM: x86/mmu: Set @writable to false for non-visible accesses by L2
KVM: x86/mmu: Avoid an extra memslot lookup in try_async_pf() for L2
arch/x86/kvm/mmu/mmu.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--
2.26.0