x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs
authorAndreas Herrmann <herrmann.der.user@googlemail.com>
Tue, 27 Apr 2010 10:13:48 +0000 (12:13 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 26 May 2010 21:29:18 +0000 (14:29 -0700)
commitf46c7299a930469f51e30b7be281c33630917244
tree8f323a0a589655bcce8fdd39b70de5bc0fbe618a
parent798e99d358157dfcec37c1b0b911ed711d0e0da6
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