WSL2-Linux-Kernel/arch/x86/kvm/vmx
Sean Christopherson c7cb2d650c KVM: VMX: Explicitly clear RFLAGS.CF and RFLAGS.ZF in VM-Exit RSB path
Clear CF and ZF in the VM-Exit path after doing __FILL_RETURN_BUFFER so
that KVM doesn't interpret clobbered RFLAGS as a VM-Fail.  Filling the
RSB has always clobbered RFLAGS, its current incarnation just happens
clear CF and ZF in the processs.  Relying on the macro to clear CF and
ZF is extremely fragile, e.g. commit 089dd8e531 ("x86/speculation:
Change FILL_RETURN_BUFFER to work with objtool") tweaks the loop such
that the ZF flag is always set.

Reported-by: Qian Cai <cai@lca.pw>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: stable@vger.kernel.org
Fixes: f2fde6a5bc ("KVM: VMX: Move RSB stuffing to before the first RET after VM-Exit")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200506035355.2242-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-05-06 06:51:35 -04:00
..
capabilities.h KVM: x86: Handle PKU CPUID adjustment in VMX code 2020-03-16 17:58:19 +01:00
evmcs.c x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests 2020-02-05 15:55:26 +01:00
evmcs.h KVM: nVMX: properly handle errors in nested_vmx_handle_enlightened_vmptrld() 2020-03-16 18:19:30 +01:00
nested.c KVM: nVMX: Replace a BUG_ON(1) with BUG() to squash clang warning 2020-05-04 11:58:55 -04:00
nested.h KVM: VMX: Configure runtime hooks using vmx_x86_ops 2020-03-31 10:48:06 -04:00
ops.h x86/kvm: fix a missing-prototypes "vmread_error" 2020-04-02 15:17:45 -04:00
pmu_intel.c KVM: VMX: Directly query Intel PT mode when refreshing PMUs 2020-03-16 17:58:38 +01:00
vmcs.h KVM: VMX: Leave preemption timer running when it's disabled 2019-06-18 17:10:46 +02:00
vmcs12.c
vmcs12.h KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
vmcs_shadow_fields.h KVM: Fix some out-dated function names in comment 2020-01-21 13:57:27 +01:00
vmenter.S KVM: VMX: Explicitly clear RFLAGS.CF and RFLAGS.ZF in VM-Exit RSB path 2020-05-06 06:51:35 -04:00
vmx.c KVM: s390: Fix for 5.7 and maintainer update 2020-04-21 09:37:13 -04:00
vmx.h ARM: 2020-04-02 15:13:15 -07:00