android_kernel_samsung_a7y1.../arch/x86/kvm
Sean Christopherson c403bdb631 KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr
[ Upstream commit c4409905cd6eb42cfd06126e9226b0150e05a715 ]

Re-execution after an emulation decode failure is only intended to
handle a case where two or vCPUs race to write a shadowed page, i.e.
we should never re-execute an instruction as part of MMIO emulation.
As handle_ept_misconfig() is only used for MMIO emulation, it should
pass EMULTYPE_NO_REEXECUTE when using the emulator to skip an instr
in the fast-MMIO case where VM_EXIT_INSTRUCTION_LEN is invalid.

And because the cr2 value passed to x86_emulate_instruction() is only
destined for use when retrying or reexecuting, we can simply call
emulate_instruction().

Fixes: d391f1207067 ("x86/kvm/vmx: do not use vm-exit instruction length
                      for fast MMIO when running nested")
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 14:23:51 +02:00
..
assigned-dev.c
assigned-dev.h
cpuid.c KVM: x86: emulate RDPID 2020-04-07 13:55:00 +02:00
cpuid.h x86/bugs: Add AMD's SPEC_CTRL MSR usage 2020-04-06 16:50:10 +02:00
emulate.c KVM: x86: clear stale x86_emulate_ctxt->intercept value 2020-04-07 14:11:38 +02:00
hyperv.c KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks 2020-04-07 13:50:22 +02:00
hyperv.h
i8254.c KVM: x86: protect KVM_CREATE_PIT/KVM_CREATE_PIT2 with kvm->lock 2020-04-06 19:31:29 +02:00
i8254.h
i8259.c KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks 2020-04-07 13:51:21 +02:00
ioapic.c KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks 2020-04-07 13:50:28 +02:00
ioapic.h
iommu.c
irq_comm.c
irq.c
irq.h
Kconfig
kvm_cache_regs.h
lapic.c KVM: apic: avoid calculating pending eoi from an uninitialized val 2020-04-07 14:03:49 +02:00
lapic.h
Makefile
mmu_audit.c
mmu.c
mmu.h
mmutrace.h
mtrr.c KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks 2020-04-07 13:50:33 +02:00
paging_tmpl.h
pmu_amd.c
pmu_intel.c KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks 2020-04-07 13:51:23 +02:00
pmu.c KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed 2020-04-06 20:04:23 +02:00
pmu.h KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks 2020-04-07 13:50:26 +02:00
svm.c KVM: x86: SVM: Call x86_spec_ctrl_set_guest/host() with interrupts disabled 2020-04-06 16:50:30 +02:00
trace.h x86/vdso: Remove direct HPET access through the vDSO 2020-04-06 20:50:21 +02:00
tss.h
vmx.c KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr 2020-04-07 14:23:51 +02:00
x86.c KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM 2020-04-07 13:51:29 +02:00
x86.h