KVM: x86: Update retry protection fields when forcing retry on emulation failure
authorSean Christopherson <seanjc@google.com>
Sat, 31 Aug 2024 00:15:33 +0000 (17:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 10 Sep 2024 03:16:32 +0000 (20:16 -0700)
commit4df685664bed04794ad72b58d8af1fa4fcc60261
tree7205f9cedd0d3497d0b38cce5b5ded31f7f4d922
parentdabc4ff70c35756bc107bc5d035d0f0746396a9a
KVM: x86: Update retry protection fields when forcing retry on emulation failure

When retrying the faulting instruction after emulation failure, refresh
the infinite loop protection fields even if no shadow pages were zapped,
i.e. avoid hitting an infinite loop even when retrying the instruction as
a last-ditch effort to avoid terminating the guest.

Link: https://lore.kernel.org/r/20240831001538.336683-19-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/x86.c