aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h1
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h10
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index e1b441cce416..db7db0a96967 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -22,7 +22,6 @@
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/kvm_host.h> 24#include <linux/kvm_host.h>
25#include <asm/kvm_ppc.h>
26#include <asm/kvm_book3s_64_asm.h> 25#include <asm/kvm_book3s_64_asm.h>
27 26
28struct kvmppc_slb { 27struct kvmppc_slb {
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 09816da9e950..e2642829e435 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -28,6 +28,9 @@
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/kvm_types.h> 29#include <linux/kvm_types.h>
30#include <linux/kvm_host.h> 30#include <linux/kvm_host.h>
31#ifdef CONFIG_PPC_BOOK3S
32#include <asm/kvm_book3s.h>
33#endif
31 34
32enum emulation_result { 35enum emulation_result {
33 EMULATE_DONE, /* no further processing */ 36 EMULATE_DONE, /* no further processing */
@@ -102,9 +105,10 @@ extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
102 105
103static inline void kvmppc_set_gpr(struct kvm_vcpu *vcpu, int num, ulong val) 106static inline void kvmppc_set_gpr(struct kvm_vcpu *vcpu, int num, ulong val)
104{ 107{
105 if ( num < 14 ) 108 if ( num < 14 ) {
106 get_paca()->shadow_vcpu.gpr[num] = val; 109 get_paca()->shadow_vcpu.gpr[num] = val;
107 else 110 to_book3s(vcpu)->shadow_vcpu.gpr[num] = val;
111 } else
108 vcpu->arch.gpr[num] = val; 112 vcpu->arch.gpr[num] = val;
109} 113}
110 114
@@ -119,6 +123,7 @@ static inline ulong kvmppc_get_gpr(struct kvm_vcpu *vcpu, int num)
119static inline void kvmppc_set_cr(struct kvm_vcpu *vcpu, u32 val) 123static inline void kvmppc_set_cr(struct kvm_vcpu *vcpu, u32 val)
120{ 124{
121 get_paca()->shadow_vcpu.cr = val; 125 get_paca()->shadow_vcpu.cr = val;
126 to_book3s(vcpu)->shadow_vcpu.cr = val;
122} 127}
123 128
124static inline u32 kvmppc_get_cr(struct kvm_vcpu *vcpu) 129static inline u32 kvmppc_get_cr(struct kvm_vcpu *vcpu)
@@ -129,6 +134,7 @@ static inline u32 kvmppc_get_cr(struct kvm_vcpu *vcpu)
129static inline void kvmppc_set_xer(struct kvm_vcpu *vcpu, u32 val) 134static inline void kvmppc_set_xer(struct kvm_vcpu *vcpu, u32 val)
130{ 135{
131 get_paca()->shadow_vcpu.xer = val; 136 get_paca()->shadow_vcpu.xer = val;
137 to_book3s(vcpu)->shadow_vcpu.xer = val;
132} 138}
133 139
134static inline u32 kvmppc_get_xer(struct kvm_vcpu *vcpu) 140static inline u32 kvmppc_get_xer(struct kvm_vcpu *vcpu)