]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: WARN on MMIO cache hit when emulating write-protected gfn
authorSean Christopherson <seanjc@google.com>
Sat, 31 Aug 2024 00:15:37 +0000 (17:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 10 Sep 2024 03:16:36 +0000 (20:16 -0700)
commit98a69b96caca3e07aff57ca91fd7cc3a3853871a
tree3fbaf5adcad01ac0ee38e46f790f05b70d140cf0
parentd859b16161c81ee929b7b02a85227b8e3250bc97
KVM: x86/mmu: WARN on MMIO cache hit when emulating write-protected gfn

WARN if KVM gets an MMIO cache hit on a RET_PF_WRITE_PROTECTED fault, as
KVM should return RET_PF_WRITE_PROTECTED if and only if there is a memslot,
and creating a memslot is supposed to invalidate the MMIO cache by virtue
of changing the memslot generation.

Keep the code around mainly to provide a convenient location to document
why emulated MMIO should be impossible.

Suggested-by: Yuan Yao <yuan.yao@linux.intel.com>
Link: https://lore.kernel.org/r/20240831001538.336683-23-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c