diff options
Diffstat (limited to 'arch/arm/kvm/coproc.c')
-rw-r--r-- | arch/arm/kvm/coproc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c index 7bed7556077a..8eea97be1ed5 100644 --- a/arch/arm/kvm/coproc.c +++ b/arch/arm/kvm/coproc.c | |||
@@ -76,7 +76,7 @@ static bool access_dcsw(struct kvm_vcpu *vcpu, | |||
76 | const struct coproc_params *p, | 76 | const struct coproc_params *p, |
77 | const struct coproc_reg *r) | 77 | const struct coproc_reg *r) |
78 | { | 78 | { |
79 | u32 val; | 79 | unsigned long val; |
80 | int cpu; | 80 | int cpu; |
81 | 81 | ||
82 | if (!p->is_write) | 82 | if (!p->is_write) |
@@ -293,12 +293,12 @@ static int emulate_cp15(struct kvm_vcpu *vcpu, | |||
293 | 293 | ||
294 | if (likely(r->access(vcpu, params, r))) { | 294 | if (likely(r->access(vcpu, params, r))) { |
295 | /* Skip instruction, since it was emulated */ | 295 | /* Skip instruction, since it was emulated */ |
296 | kvm_skip_instr(vcpu, (vcpu->arch.hsr >> 25) & 1); | 296 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); |
297 | return 1; | 297 | return 1; |
298 | } | 298 | } |
299 | /* If access function fails, it should complain. */ | 299 | /* If access function fails, it should complain. */ |
300 | } else { | 300 | } else { |
301 | kvm_err("Unsupported guest CP15 access at: %08x\n", | 301 | kvm_err("Unsupported guest CP15 access at: %08lx\n", |
302 | *vcpu_pc(vcpu)); | 302 | *vcpu_pc(vcpu)); |
303 | print_cp_instr(params); | 303 | print_cp_instr(params); |
304 | } | 304 | } |
@@ -315,14 +315,14 @@ int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
315 | { | 315 | { |
316 | struct coproc_params params; | 316 | struct coproc_params params; |
317 | 317 | ||
318 | params.CRm = (vcpu->arch.hsr >> 1) & 0xf; | 318 | params.CRm = (kvm_vcpu_get_hsr(vcpu) >> 1) & 0xf; |
319 | params.Rt1 = (vcpu->arch.hsr >> 5) & 0xf; | 319 | params.Rt1 = (kvm_vcpu_get_hsr(vcpu) >> 5) & 0xf; |
320 | params.is_write = ((vcpu->arch.hsr & 1) == 0); | 320 | params.is_write = ((kvm_vcpu_get_hsr(vcpu) & 1) == 0); |
321 | params.is_64bit = true; | 321 | params.is_64bit = true; |
322 | 322 | ||
323 | params.Op1 = (vcpu->arch.hsr >> 16) & 0xf; | 323 | params.Op1 = (kvm_vcpu_get_hsr(vcpu) >> 16) & 0xf; |
324 | params.Op2 = 0; | 324 | params.Op2 = 0; |
325 | params.Rt2 = (vcpu->arch.hsr >> 10) & 0xf; | 325 | params.Rt2 = (kvm_vcpu_get_hsr(vcpu) >> 10) & 0xf; |
326 | params.CRn = 0; | 326 | params.CRn = 0; |
327 | 327 | ||
328 | return emulate_cp15(vcpu, ¶ms); | 328 | return emulate_cp15(vcpu, ¶ms); |
@@ -347,14 +347,14 @@ int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
347 | { | 347 | { |
348 | struct coproc_params params; | 348 | struct coproc_params params; |
349 | 349 | ||
350 | params.CRm = (vcpu->arch.hsr >> 1) & 0xf; | 350 | params.CRm = (kvm_vcpu_get_hsr(vcpu) >> 1) & 0xf; |
351 | params.Rt1 = (vcpu->arch.hsr >> 5) & 0xf; | 351 | params.Rt1 = (kvm_vcpu_get_hsr(vcpu) >> 5) & 0xf; |
352 | params.is_write = ((vcpu->arch.hsr & 1) == 0); | 352 | params.is_write = ((kvm_vcpu_get_hsr(vcpu) & 1) == 0); |
353 | params.is_64bit = false; | 353 | params.is_64bit = false; |
354 | 354 | ||
355 | params.CRn = (vcpu->arch.hsr >> 10) & 0xf; | 355 | params.CRn = (kvm_vcpu_get_hsr(vcpu) >> 10) & 0xf; |
356 | params.Op1 = (vcpu->arch.hsr >> 14) & 0x7; | 356 | params.Op1 = (kvm_vcpu_get_hsr(vcpu) >> 14) & 0x7; |
357 | params.Op2 = (vcpu->arch.hsr >> 17) & 0x7; | 357 | params.Op2 = (kvm_vcpu_get_hsr(vcpu) >> 17) & 0x7; |
358 | params.Rt2 = 0; | 358 | params.Rt2 = 0; |
359 | 359 | ||
360 | return emulate_cp15(vcpu, ¶ms); | 360 | return emulate_cp15(vcpu, ¶ms); |