x86, amd: Use _safe() msr access for GartTlbWlk disable code
authorRoedel, Joerg <Joerg.Roedel@amd.com>
Thu, 19 May 2011 09:13:39 +0000 (11:13 +0200)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:21:01 +0000 (12:21 -0500)
commit346ac04a5e66b217a4dbbc131c33d14a744fd615
tree889f77e05483586a4e5d56cee6bc95881d943d51
parent57af21232e06a903d5d06d7013ae85f95c754ddc
x86, amd: Use _safe() msr access for GartTlbWlk disable code

BugLink: http://bugs.launchpad.net/bugs/793702

commit d47cc0db8fd6011de2248df505fc34990b7451bf upstream.

The workaround for Bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=33012

introduced a read and a write to the MC4 mask msr.

Unfortunatly this MSR is not emulated by the KVM hypervisor
so that the kernel will get a #GP and crashes when applying
this workaround when running inside KVM.

This issue was reported as:

https://bugzilla.kernel.org/show_bug.cgi?id=35132

and is fixed with this patch. The change just let the kernel
ignore any #GP it gets while accessing this MSR by using the
_safe msr access methods.

Reported-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/x86/kernel/cpu/amd.c