summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kvm_book3s_asm.h
diff options
context:
space:
mode:
authorPaul Mackerras2013-02-04 19:10:51 +0100
committerBenjamin Herrenschmidt2013-02-15 06:54:33 +0100
commit0acb91112a148fbb31678e66839ef757f3be3aa4 (patch)
tree9516f90d03a55bc07f8b13b67d497dea8062430c /arch/powerpc/include/asm/kvm_book3s_asm.h
parentpowerpc: Save CFAR before branching in interrupt entry paths (diff)
downloadkernel-qcow2-linux-0acb91112a148fbb31678e66839ef757f3be3aa4.tar.gz
kernel-qcow2-linux-0acb91112a148fbb31678e66839ef757f3be3aa4.tar.xz
kernel-qcow2-linux-0acb91112a148fbb31678e66839ef757f3be3aa4.zip
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>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s_asm.h')
-rw-r--r--arch/powerpc/include/asm/kvm_book3s_asm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h
index 88609b23b775..cdc3d2717cc6 100644
--- a/arch/powerpc/include/asm/kvm_book3s_asm.h
+++ b/arch/powerpc/include/asm/kvm_book3s_asm.h
@@ -93,6 +93,9 @@ struct kvmppc_host_state {
u64 host_dscr;
u64 dec_expires;
#endif
+#ifdef CONFIG_PPC_BOOK3S_64
+ u64 cfar;
+#endif
};
struct kvmppc_book3s_shadow_vcpu {