powerpc/kvm/book3s_hv: Preserve guest CFAR register value
authorPaul Mackerras <paulus@samba.org>
Mon, 4 Feb 2013 18:10:51 +0000 (18:10 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 15 Feb 2013 05:54:33 +0000 (16:54 +1100)
commit0acb91112a148fbb31678e66839ef757f3be3aa4
tree9516f90d03a55bc07f8b13b67d497dea8062430c
parent1707dd161349e6c54170c88d94fed012e3d224e3
powerpc/kvm/book3s_hv: Preserve guest CFAR register value

The CFAR (Come-From Address Register) is a useful debugging aid that
exists on POWER7 processors.  Currently HV KVM doesn't save or restore
the CFAR register for guest vcpus, making the CFAR of limited use in
guests.

This adds the necessary code to capture the CFAR value saved in the
early exception entry code (it has to be saved before any branch is
executed), save it in the vcpu.arch struct, and restore it on entry
to the guest.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/kvm_book3s_asm.h
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S