lkml.org 
[lkml]   [2021]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation
From
Date
On 26/08/21 18:01, Sean Christopherson wrote:
>> + if (vmx->emulation_required)
>> + return;
> Rather than play whack-a-mole with flows consuming stale state, I'd much prefer
> to synthesize a VM-Exit(INVALID_GUEST_STATE). Alternatively, just skip ->run()
> entirely by adding hooks in vcpu_enter_guest(), but that's a much larger change
> and probably not worth the risk at this juncture.

I'm going with Maxim's patch for now (and for stable kernels especially)
but I like the


+ if (unlikely(static_call(kvm_x86_emulation_required)(vcpu)))
+ return static_call(kvm_x86_emulate_invalid_guest_state)(vcpu);
+

idea. I'll put a Fixes for 95b5a48c4f2b ("KVM: VMX: Handle NMIs, #MCs and
async #PFs in common irqs-disabled fn", Linux 5.3).

Paolo

\
 
 \ /
  Last update: 2021-09-06 12:10    [W:0.070 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site