aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
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
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')
-rw-r--r--arch/powerpc/include/asm/kvm_host.h50
-rw-r--r--arch/powerpc/kvm/booke.c10
-rw-r--r--arch/powerpc/kvm/emulate.c2
-rw-r--r--arch/powerpc/kvm/powerpc.c4
4 files changed, 33 insertions, 33 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 765d8ec8b7d6..a4a7d5ef6cf8 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -84,32 +84,32 @@ struct kvm_vcpu_arch {
84 u32 host_msr; 84 u32 host_msr;
85 85
86 u64 fpr[32]; 86 u64 fpr[32];
87 u32 gpr[32]; 87 ulong gpr[32];
88 88
89 u32 pc; 89 ulong pc;
90 u32 cr; 90 u32 cr;
91 u32 ctr; 91 ulong ctr;
92 u32 lr; 92 ulong lr;
93 u32 xer; 93 ulong xer;
94 94
95 u32 msr; 95 ulong msr;
96 u32 mmucr; 96 u32 mmucr;
97 u32 sprg0; 97 ulong sprg0;
98 u32 sprg1; 98 ulong sprg1;
99 u32 sprg2; 99 ulong sprg2;
100 u32 sprg3; 100 ulong sprg3;
101 u32 sprg4; 101 ulong sprg4;
102 u32 sprg5; 102 ulong sprg5;
103 u32 sprg6; 103 ulong sprg6;
104 u32 sprg7; 104 ulong sprg7;
105 u32 srr0; 105 ulong srr0;
106 u32 srr1; 106 ulong srr1;
107 u32 csrr0; 107 ulong csrr0;
108 u32 csrr1; 108 ulong csrr1;
109 u32 dsrr0; 109 ulong dsrr0;
110 u32 dsrr1; 110 ulong dsrr1;
111 u32 dear; 111 ulong dear;
112 u32 esr; 112 ulong esr;
113 u32 dec; 113 u32 dec;
114 u32 decar; 114 u32 decar;
115 u32 tbl; 115 u32 tbl;
@@ -117,7 +117,7 @@ struct kvm_vcpu_arch {
117 u32 tcr; 117 u32 tcr;
118 u32 tsr; 118 u32 tsr;
119 u32 ivor[16]; 119 u32 ivor[16];
120 u32 ivpr; 120 ulong ivpr;
121 u32 pir; 121 u32 pir;
122 122
123 u32 shadow_pid; 123 u32 shadow_pid;
@@ -131,8 +131,8 @@ struct kvm_vcpu_arch {
131 u32 dbcr1; 131 u32 dbcr1;
132 132
133 u32 last_inst; 133 u32 last_inst;
134 u32 fault_dear; 134 ulong fault_dear;
135 u32 fault_esr; 135 ulong fault_esr;
136 gpa_t paddr_accessed; 136 gpa_t paddr_accessed;
137 137
138 u8 io_gpr; /* GPR used as IO source/target */ 138 u8 io_gpr; /* GPR used as IO source/target */
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);