]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Check EMULTYPE_WRITE_PF_TO_SP before unprotecting gfn
authorSean Christopherson <seanjc@google.com>
Sat, 31 Aug 2024 00:15:31 +0000 (17:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 10 Sep 2024 03:16:31 +0000 (20:16 -0700)
commit19ab2c8be070160be70a88027b3b93106fef7b89
treec9f5feafbc52f6e81c63d260a09dafc091f6d840
parent620525739521376a65a690df899e1596d56791f8
KVM: x86: Check EMULTYPE_WRITE_PF_TO_SP before unprotecting gfn

Don't bother unprotecting the target gfn if EMULTYPE_WRITE_PF_TO_SP is
set, as KVM will simply report the emulation failure to userspace.  This
will allow converting reexecute_instruction() to use
kvm_mmu_unprotect_gfn_instead_retry() instead of kvm_mmu_unprotect_page().

Link: https://lore.kernel.org/r/20240831001538.336683-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c