summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-02-23 10:27:32 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-02-23 10:27:32 +0100
commit27121864ab366992583d894961ecdc6e2ffe0ca1 (patch)
tree87ef1dcf82ce2d0d29b686d5ae81003ab3eb3b4a /arch/x86/kvm/x86.c
parent84549c816dc317f012798e706e58669b3b013604 (diff)
parentf047382519ca41702ebaee5a862e87390f687137 (diff)
Merge tag 'spi-nor/for-6.3' into mtd/next
SPI NOR changes: * small fixes on core and spansion driver.
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 312aea1854ae..da4bbd043a7b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -13132,6 +13132,9 @@ int kvm_handle_memory_failure(struct kvm_vcpu *vcpu, int r,
struct x86_exception *e)
{
if (r == X86EMUL_PROPAGATE_FAULT) {
+ if (KVM_BUG_ON(!e, vcpu->kvm))
+ return -EIO;
+
kvm_inject_emulated_page_fault(vcpu, e);
return 1;
}