aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBharat Bhushan <Bharat.Bhushan@freescale.com>2014-07-17 07:31:39 -0400
committerAlexander Graf <agraf@suse.de>2014-07-28 09:23:12 -0400
commitc1b8a01bf959e87cff9c9dcaf51cb5c1d60a2c52 (patch)
treec20d6ab8efe46eb44e9c91955355c5573dd6f26f /arch
parentdc168549d9a0fb55d3021ee408adf25786cfda23 (diff)
kvm: ppc: booke: Use the shared struct helpers for SPRN_SPRG0-7
Use kvmppc_set_sprg[0-7]() and kvmppc_get_sprg[0-7]() helper functions Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kvm/booke.c32
-rw-r--r--arch/powerpc/kvm/booke_emulate.c8
2 files changed, 20 insertions, 20 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 25a7e70a2bc0..34562d4a3a12 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1227,14 +1227,14 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
1227 regs->srr0 = kvmppc_get_srr0(vcpu); 1227 regs->srr0 = kvmppc_get_srr0(vcpu);
1228 regs->srr1 = kvmppc_get_srr1(vcpu); 1228 regs->srr1 = kvmppc_get_srr1(vcpu);
1229 regs->pid = vcpu->arch.pid; 1229 regs->pid = vcpu->arch.pid;
1230 regs->sprg0 = vcpu->arch.shared->sprg0; 1230 regs->sprg0 = kvmppc_get_sprg0(vcpu);
1231 regs->sprg1 = vcpu->arch.shared->sprg1; 1231 regs->sprg1 = kvmppc_get_sprg1(vcpu);
1232 regs->sprg2 = vcpu->arch.shared->sprg2; 1232 regs->sprg2 = kvmppc_get_sprg2(vcpu);
1233 regs->sprg3 = vcpu->arch.shared->sprg3; 1233 regs->sprg3 = kvmppc_get_sprg3(vcpu);
1234 regs->sprg4 = vcpu->arch.shared->sprg4; 1234 regs->sprg4 = kvmppc_get_sprg4(vcpu);
1235 regs->sprg5 = vcpu->arch.shared->sprg5; 1235 regs->sprg5 = kvmppc_get_sprg5(vcpu);
1236 regs->sprg6 = vcpu->arch.shared->sprg6; 1236 regs->sprg6 = kvmppc_get_sprg6(vcpu);
1237 regs->sprg7 = vcpu->arch.shared->sprg7; 1237 regs->sprg7 = kvmppc_get_sprg7(vcpu);
1238 1238
1239 for (i = 0; i < ARRAY_SIZE(regs->gpr); i++) 1239 for (i = 0; i < ARRAY_SIZE(regs->gpr); i++)
1240 regs->gpr[i] = kvmppc_get_gpr(vcpu, i); 1240 regs->gpr[i] = kvmppc_get_gpr(vcpu, i);
@@ -1255,14 +1255,14 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
1255 kvmppc_set_srr0(vcpu, regs->srr0); 1255 kvmppc_set_srr0(vcpu, regs->srr0);
1256 kvmppc_set_srr1(vcpu, regs->srr1); 1256 kvmppc_set_srr1(vcpu, regs->srr1);
1257 kvmppc_set_pid(vcpu, regs->pid); 1257 kvmppc_set_pid(vcpu, regs->pid);
1258 vcpu->arch.shared->sprg0 = regs->sprg0; 1258 kvmppc_set_sprg0(vcpu, regs->sprg0);
1259 vcpu->arch.shared->sprg1 = regs->sprg1; 1259 kvmppc_set_sprg1(vcpu, regs->sprg1);
1260 vcpu->arch.shared->sprg2 = regs->sprg2; 1260 kvmppc_set_sprg2(vcpu, regs->sprg2);
1261 vcpu->arch.shared->sprg3 = regs->sprg3; 1261 kvmppc_set_sprg3(vcpu, regs->sprg3);
1262 vcpu->arch.shared->sprg4 = regs->sprg4; 1262 kvmppc_set_sprg4(vcpu, regs->sprg4);
1263 vcpu->arch.shared->sprg5 = regs->sprg5; 1263 kvmppc_set_sprg5(vcpu, regs->sprg5);
1264 vcpu->arch.shared->sprg6 = regs->sprg6; 1264 kvmppc_set_sprg6(vcpu, regs->sprg6);
1265 vcpu->arch.shared->sprg7 = regs->sprg7; 1265 kvmppc_set_sprg7(vcpu, regs->sprg7);
1266 1266
1267 for (i = 0; i < ARRAY_SIZE(regs->gpr); i++) 1267 for (i = 0; i < ARRAY_SIZE(regs->gpr); i++)
1268 kvmppc_set_gpr(vcpu, i, regs->gpr[i]); 1268 kvmppc_set_gpr(vcpu, i, regs->gpr[i]);
diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm/booke_emulate.c
index 27a4b2877c10..28c158881d23 100644
--- a/arch/powerpc/kvm/booke_emulate.c
+++ b/arch/powerpc/kvm/booke_emulate.c
@@ -165,16 +165,16 @@ int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val)
165 * guest (PR-mode only). 165 * guest (PR-mode only).
166 */ 166 */
167 case SPRN_SPRG4: 167 case SPRN_SPRG4:
168 vcpu->arch.shared->sprg4 = spr_val; 168 kvmppc_set_sprg4(vcpu, spr_val);
169 break; 169 break;
170 case SPRN_SPRG5: 170 case SPRN_SPRG5:
171 vcpu->arch.shared->sprg5 = spr_val; 171 kvmppc_set_sprg5(vcpu, spr_val);
172 break; 172 break;
173 case SPRN_SPRG6: 173 case SPRN_SPRG6:
174 vcpu->arch.shared->sprg6 = spr_val; 174 kvmppc_set_sprg6(vcpu, spr_val);
175 break; 175 break;
176 case SPRN_SPRG7: 176 case SPRN_SPRG7:
177 vcpu->arch.shared->sprg7 = spr_val; 177 kvmppc_set_sprg7(vcpu, spr_val);
178 break; 178 break;
179 179
180 case SPRN_IVPR: 180 case SPRN_IVPR: