]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: emulating RDPID failure shall return #UD rather than #GP
authorRobert Hoo <robert.hu@linux.intel.com>
Fri, 28 Aug 2020 02:23:42 +0000 (10:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:10 +0000 (10:08 +0100)
commitbdde093c81f26b62f4704db288345ae14058b075
tree213cb37495d254a696ccf8c9890ca8d32a5a88dd
parent029525c89bf1195138279f4e99a09341a032e9a6
KVM: x86: emulating RDPID failure shall return #UD rather than #GP

[ Upstream commit a9e2e0ae686094571378c72d8146b5a1a92d0652 ]

Per Intel's SDM, RDPID takes a #UD if it is unsupported, which is more or
less what KVM is emulating when MSR_TSC_AUX is not available.  In fact,
there are no scenarios in which RDPID is supposed to #GP.

Fixes: fb6d4d340e ("KVM: x86: emulate RDPID")
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Message-Id: <1598581422-76264-1-git-send-email-robert.hu@linux.intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/emulate.c