linux_dsm_epyc7002/arch/x86/kvm
Joerg Roedel 893a5ab6ee KVM: SVM: Make sure KERNEL_GS_BASE is valid when loading gs_index
The gs_index loading code uses the swapgs instruction to
switch to the user gs_base temporarily. This is unsave in an
lightweight exit-path in KVM on AMD because the
KERNEL_GS_BASE MSR is switches lazily. An NMI happening in
the critical path of load_gs_index may use the wrong GS_BASE
value then leading to unpredictable behavior, e.g. a
triple-fault.

This patch fixes the issue by making sure that load_gs_index
is called only with a valid KERNEL_GS_BASE value loaded in
KVM.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-02-09 18:31:36 +02:00
..
emulate.c
i8254.c
i8254.h
i8259.c
irq.c
irq.h
Kconfig
kvm_cache_regs.h
kvm_timer.h
lapic.c
lapic.h
Makefile
mmu_audit.c
mmu.c thp: mmu_notifier_test_young 2011-01-13 17:32:46 -08:00
mmu.h
mmutrace.h
paging_tmpl.h
svm.c KVM: SVM: Make sure KERNEL_GS_BASE is valid when loading gs_index 2011-02-09 18:31:36 +02:00
timer.c
trace.h
tss.h
vmx.c
x86.c
x86.h