x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs
commit893bb29ec037b10287d127d037fd77e61b397420
authorAndreas Herrmann <herrmann.der.user@googlemail.com>
Tue, 27 Apr 2010 10:13:48 +0000 (27 12:13 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 26 May 2010 21:32:09 +0000 (26 14:32 -0700)
tree152be4beaa35029a0b2ae59808fd37ba8316f82e
parented46845f456ea04ad899551148efc6e085459c4e
x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs

commit f01487119dda3d9f58c9729c7361ecc50a61c188 upstream.

If host CPU is exposed to a guest the OSVW MSRs are not guaranteed
to be present and a GP fault occurs. Thus checking the feature flag is
essential.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100427101348.GC4489@alberich.amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/process.c