aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-05 10:36:19 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:52:22 -0500
commit5cf8ca22146fa106f3bb865631ec04f5b499508f (patch)
tree4a32a552277e4c3a6a103f05d164dfc97dbf2bae /arch/powerpc/kvm
parentdb93f5745d836f81cef0b4101a7c2685eeb55efb (diff)
KVM: ppc: adjust vcpu types to support 64-bit cores
However, some of these fields could be split into separate per-core structures in the future. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/booke.c10
-rw-r--r--arch/powerpc/kvm/emulate.c2
-rw-r--r--arch/powerpc/kvm/powerpc.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 883e9db5f00c..b23cd54603f4 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -120,14 +120,14 @@ void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu)
120{ 120{
121 int i; 121 int i;
122 122
123 printk("pc: %08x msr: %08x\n", vcpu->arch.pc, vcpu->arch.msr); 123 printk("pc: %08lx msr: %08lx\n", vcpu->arch.pc, vcpu->arch.msr);
124 printk("lr: %08x ctr: %08x\n", vcpu->arch.lr, vcpu->arch.ctr); 124 printk("lr: %08lx ctr: %08lx\n", vcpu->arch.lr, vcpu->arch.ctr);
125 printk("srr0: %08x srr1: %08x\n", vcpu->arch.srr0, vcpu->arch.srr1); 125 printk("srr0: %08lx srr1: %08lx\n", vcpu->arch.srr0, vcpu->arch.srr1);
126 126
127 printk("exceptions: %08lx\n", vcpu->arch.pending_exceptions); 127 printk("exceptions: %08lx\n", vcpu->arch.pending_exceptions);
128 128
129 for (i = 0; i < 32; i += 4) { 129 for (i = 0; i < 32; i += 4) {
130 printk("gpr%02d: %08x %08x %08x %08x\n", i, 130 printk("gpr%02d: %08lx %08lx %08lx %08lx\n", i,
131 vcpu->arch.gpr[i], 131 vcpu->arch.gpr[i],
132 vcpu->arch.gpr[i+1], 132 vcpu->arch.gpr[i+1],
133 vcpu->arch.gpr[i+2], 133 vcpu->arch.gpr[i+2],
@@ -305,7 +305,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
305 break; 305 break;
306 case EMULATE_FAIL: 306 case EMULATE_FAIL:
307 /* XXX Deliver Program interrupt to guest. */ 307 /* XXX Deliver Program interrupt to guest. */
308 printk(KERN_CRIT "%s: emulation at %x failed (%08x)\n", 308 printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n",
309 __func__, vcpu->arch.pc, vcpu->arch.last_inst); 309 __func__, vcpu->arch.pc, vcpu->arch.last_inst);
310 /* For debugging, encode the failing instruction and 310 /* For debugging, encode the failing instruction and
311 * report it to userspace. */ 311 * report it to userspace. */
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 30a49f8c49b2..814f1e687857 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -380,7 +380,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
380 } 380 }
381 } 381 }
382 382
383 KVMTRACE_3D(PPC_INSTR, vcpu, inst, vcpu->arch.pc, emulated, entryexit); 383 KVMTRACE_3D(PPC_INSTR, vcpu, inst, (int)vcpu->arch.pc, emulated, entryexit);
384 384
385 if (advance) 385 if (advance)
386 vcpu->arch.pc += 4; /* Advance past emulated instruction. */ 386 vcpu->arch.pc += 4; /* Advance past emulated instruction. */
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 237f3ba68d27..7ad150e0fbbf 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -256,14 +256,14 @@ int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu,
256static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, 256static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
257 struct kvm_run *run) 257 struct kvm_run *run)
258{ 258{
259 u32 *gpr = &vcpu->arch.gpr[vcpu->arch.io_gpr]; 259 ulong *gpr = &vcpu->arch.gpr[vcpu->arch.io_gpr];
260 *gpr = run->dcr.data; 260 *gpr = run->dcr.data;
261} 261}
262 262
263static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu, 263static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
264 struct kvm_run *run) 264 struct kvm_run *run)
265{ 265{
266 u32 *gpr = &vcpu->arch.gpr[vcpu->arch.io_gpr]; 266 ulong *gpr = &vcpu->arch.gpr[vcpu->arch.io_gpr];
267 267
268 if (run->mmio.len > sizeof(*gpr)) { 268 if (run->mmio.len > sizeof(*gpr)) {
269 printk(KERN_ERR "bad MMIO length: %d\n", run->mmio.len); 269 printk(KERN_ERR "bad MMIO length: %d\n", run->mmio.len);