kernel-fxtec-pro1x/arch/x86/kvm
Sean Christopherson 5ffb710b03 KVM: nVMX: Ignore limit checks on VMX instructions using flat segments
commit 34333cc6c2cb021662fd32e24e618d1b86de95bf upstream.

Regarding segments with a limit==0xffffffff, the SDM officially states:

    When the effective limit is FFFFFFFFH (4 GBytes), these accesses may
    or may not cause the indicated exceptions.  Behavior is
    implementation-specific and may vary from one execution to another.

In practice, all CPUs that support VMX ignore limit checks for "flat
segments", i.e. an expand-up data or code segment with base=0 and
limit=0xffffffff.  This is subtly different than wrapping the effective
address calculation based on the address size, as the flat segment
behavior also applies to accesses that would wrap the 4g boundary, e.g.
a 4-byte access starting at 0xffffffff will access linear addresses
0xffffffff, 0x0, 0x1 and 0x2.

Fixes: f9eb4af67c ("KVM: nVMX: VMX instructions: add checks for #GP/#SS exceptions")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 20:10:13 +01:00
..
cpuid.c kvm: x86: Return LA57 feature based on hardware capability 2019-02-27 10:09:01 +01:00
cpuid.h
debugfs.c
emulate.c kvm: x86: Remove CR3_PCID_INVD flag 2018-08-06 17:59:02 +02:00
hyperv.c KVM: x86: ensure all MSRs can always be KVM_GET/SET_MSR'd 2018-08-06 17:32:01 +02:00
hyperv.h KVM: x86: ensure all MSRs can always be KVM_GET/SET_MSR'd 2018-08-06 17:32:01 +02:00
i8254.c
i8254.h
i8259.c
ioapic.c
ioapic.h
irq.c
irq.h
irq_comm.c
Kconfig x86/kvm/Kconfig: Ensure CRYPTO_DEV_CCP_DD state at minimum matches KVM_AMD 2018-07-15 17:36:57 +02:00
kvm_cache_regs.h
lapic.c KVM: x86: fix empty-body warnings 2018-12-17 09:24:37 +01:00
lapic.h
Makefile
mmu.c KVM: x86/mmu: Detect MMIO generation wrap in any address space 2019-03-23 20:10:13 +01:00
mmu.h kvm: x86: Propagate guest PCIDs to host PCIDs 2018-08-06 17:58:56 +02:00
mmu_audit.c
mmutrace.h
mtrr.c
page_track.c treewide: kvzalloc() -> kvcalloc() 2018-06-12 16:19:22 -07:00
paging_tmpl.h kvm: x86: Add a root_hpa parameter to kvm_mmu->invlpg() 2018-08-06 17:58:58 +02:00
pmu.c
pmu.h
pmu_amd.c
pmu_intel.c
svm.c KVM: nSVM: clear events pending from svm_complete_interrupts() when exiting to L1 2019-03-05 17:58:52 +01:00
trace.h KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE}_EX implementation 2018-05-26 15:35:35 +02:00
tss.h
vmx.c KVM: nVMX: Ignore limit checks on VMX instructions using flat segments 2019-03-23 20:10:13 +01:00
vmx_evmcs.h
vmx_shadow_fields.h
x86.c KVM: Call kvm_arch_memslots_updated() before updating memslots 2019-03-23 20:10:13 +01:00
x86.h KVM: x86/mmu: Do not cache MMIO accesses while memslots are in flux 2019-03-23 20:10:13 +01:00