aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/booke.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-01-07 20:58:02 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:47 -0500
commit992b5b29b5ae254c416c62faf98d59a6cf970027 (patch)
tree52b4e5a8226261cc936225636d58d9b7e8c46976 /arch/powerpc/kvm/booke.c
parent8e5b26b55a8b6aee2c789b1d20ec715f9e4bea5c (diff)
KVM: PPC: Add helpers for CR, XER
We now have helpers for the GPRs, so let's also add some for CR and XER. Having them in the PACA simplifies code a lot, as we don't need to care about where to store CC or not to overflow any integers. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r--arch/powerpc/kvm/booke.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 49af80e4a6e1..338baf9f6b28 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -449,10 +449,10 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
449 int i; 449 int i;
450 450
451 regs->pc = vcpu->arch.pc; 451 regs->pc = vcpu->arch.pc;
452 regs->cr = vcpu->arch.cr; 452 regs->cr = kvmppc_get_cr(vcpu);
453 regs->ctr = vcpu->arch.ctr; 453 regs->ctr = vcpu->arch.ctr;
454 regs->lr = vcpu->arch.lr; 454 regs->lr = vcpu->arch.lr;
455 regs->xer = vcpu->arch.xer; 455 regs->xer = kvmppc_get_xer(vcpu);
456 regs->msr = vcpu->arch.msr; 456 regs->msr = vcpu->arch.msr;
457 regs->srr0 = vcpu->arch.srr0; 457 regs->srr0 = vcpu->arch.srr0;
458 regs->srr1 = vcpu->arch.srr1; 458 regs->srr1 = vcpu->arch.srr1;
@@ -476,10 +476,10 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
476 int i; 476 int i;
477 477
478 vcpu->arch.pc = regs->pc; 478 vcpu->arch.pc = regs->pc;
479 vcpu->arch.cr = regs->cr; 479 kvmppc_set_cr(vcpu, regs->cr);
480 vcpu->arch.ctr = regs->ctr; 480 vcpu->arch.ctr = regs->ctr;
481 vcpu->arch.lr = regs->lr; 481 vcpu->arch.lr = regs->lr;
482 vcpu->arch.xer = regs->xer; 482 kvmppc_set_xer(vcpu, regs->xer);
483 kvmppc_set_msr(vcpu, regs->msr); 483 kvmppc_set_msr(vcpu, regs->msr);
484 vcpu->arch.srr0 = regs->srr0; 484 vcpu->arch.srr0 = regs->srr0;
485 vcpu->arch.srr1 = regs->srr1; 485 vcpu->arch.srr1 = regs->srr1;