]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:49:04 +0000 (14:49 +0100)
commit0b1f542cedb6061e15b8d93c6e007d6747db91cc
tree5955c44b274b026be4762f9b8e5978945c3d165b
parent94f8886d61d7bce024d1c964122a5ef2bf80100a
KVM: x86: emulating RDPID failure shall return #UD rather than #GP

BugLink: https://bugs.launchpad.net/bugs/1902115
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
arch/x86/kvm/emulate.c