]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: fix wrong exception emulation in check_rdtsc
authorHou Wenlong <houwenlong93@linux.alibaba.com>
Wed, 18 Aug 2021 03:36:31 +0000 (11:36 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:33:11 +0000 (10:33 -0400)
commit86418aee187af8712885e912c75279a961d1fe1f
treeed5475418a692b52e865ae311c1104ad45359e66
parente8c99051cfc588f366dcc5d684e793786de96c91
kvm: fix wrong exception emulation in check_rdtsc

According to Intel's SDM Vol2 and AMD's APM Vol3, when
CR4.TSD is set, use rdtsc/rdtscp instruction above privilege
level 0 should trigger a #GP.

Fixes: 97157533b748b ("KVM: SVM: Add intercept checks for remaining group7 instructions")
Signed-off-by: Hou Wenlong <houwenlong93@linux.alibaba.com>
Message-Id: <1297c0dd3f1bb47a6d089f850b629c7aa0247040.1629257115.git.houwenlong93@linux.alibaba.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c