KVM guest: fix bogus wallclock physical address calculation
commitcc335935bf2b6084f411e244ca5323b57f864855
authorGlauber Costa <glommer@redhat.com>
Fri, 18 Sep 2009 23:08:06 +0000 (18 20:08 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 15:27:57 +0000 (5 08:27 -0700)
tree0b2fe20d557aedf264f026cfd9a09a530cb14a95
parentd1dbc751eb2a4aaf628cc9dac6954e1bd1afc531
KVM guest: fix bogus wallclock physical address calculation

(cherry picked from commit a20316d2aa41a8f4fd171648bad8f044f6060826)

The use of __pa() to calculate the address of a C-visible symbol
is wrong, and can lead to unpredictable results. See arch/x86/include/asm/page.h
for details.

It should be replaced with __pa_symbol(), that does the correct math here,
by taking relocations into account.  This ensures the correct wallclock data
structure physical address is passed to the hypervisor.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/kvmclock.c