aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-09-10 08:37:29 -0400
committerAlexander Graf <agraf@suse.de>2014-09-22 04:11:36 -0400
commit8d0eff6385640a9e6eed0b0c09113794b2bb74e9 (patch)
tree6598f70fc84d121175c1229d09248d578ea34a55 /arch/powerpc/kvm
parent033aaa14af0251285226a7dafc11c24a13959bca (diff)
KVM: PPC: Pass enum to kvmppc_get_last_inst
The kvmppc_get_last_inst function recently received a facelift that allowed us to pass an enum of the type of instruction we want to read into it rather than an unreadable boolean. Unfortunately, not all callers ended up passing the enum. This wasn't really an issue as "true" and "false" happen to match the two enum values we have, but it's still hard to read. Update all callers of kvmppc_get_last_inst() to follow the new calling convention. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/booke.c4
-rw-r--r--arch/powerpc/kvm/emulate.c2
-rw-r--r--arch/powerpc/kvm/emulate_loadstore.c2
-rw-r--r--arch/powerpc/kvm/powerpc.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index ed5b0dd58726..9b55dec2d6cc 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -992,12 +992,12 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
992 case BOOKE_INTERRUPT_DATA_STORAGE: 992 case BOOKE_INTERRUPT_DATA_STORAGE:
993 case BOOKE_INTERRUPT_DTLB_MISS: 993 case BOOKE_INTERRUPT_DTLB_MISS:
994 case BOOKE_INTERRUPT_HV_PRIV: 994 case BOOKE_INTERRUPT_HV_PRIV:
995 emulated = kvmppc_get_last_inst(vcpu, false, &last_inst); 995 emulated = kvmppc_get_last_inst(vcpu, INST_GENERIC, &last_inst);
996 break; 996 break;
997 case BOOKE_INTERRUPT_PROGRAM: 997 case BOOKE_INTERRUPT_PROGRAM:
998 /* SW breakpoints arrive as illegal instructions on HV */ 998 /* SW breakpoints arrive as illegal instructions on HV */
999 if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP) 999 if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP)
1000 emulated = kvmppc_get_last_inst(vcpu, false, &last_inst); 1000 emulated = kvmppc_get_last_inst(vcpu, INST_GENERIC, &last_inst);
1001 break; 1001 break;
1002 default: 1002 default:
1003 break; 1003 break;
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 005222b580ea..5cc2e7af3a7b 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -219,7 +219,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
219 /* this default type might be overwritten by subcategories */ 219 /* this default type might be overwritten by subcategories */
220 kvmppc_set_exit_type(vcpu, EMULATED_INST_EXITS); 220 kvmppc_set_exit_type(vcpu, EMULATED_INST_EXITS);
221 221
222 emulated = kvmppc_get_last_inst(vcpu, false, &inst); 222 emulated = kvmppc_get_last_inst(vcpu, INST_GENERIC, &inst);
223 if (emulated != EMULATE_DONE) 223 if (emulated != EMULATE_DONE)
224 return emulated; 224 return emulated;
225 225
diff --git a/arch/powerpc/kvm/emulate_loadstore.c b/arch/powerpc/kvm/emulate_loadstore.c
index 0de4ffa175a9..6d3c0ee1d744 100644
--- a/arch/powerpc/kvm/emulate_loadstore.c
+++ b/arch/powerpc/kvm/emulate_loadstore.c
@@ -58,7 +58,7 @@ int kvmppc_emulate_loadstore(struct kvm_vcpu *vcpu)
58 /* this default type might be overwritten by subcategories */ 58 /* this default type might be overwritten by subcategories */
59 kvmppc_set_exit_type(vcpu, EMULATED_INST_EXITS); 59 kvmppc_set_exit_type(vcpu, EMULATED_INST_EXITS);
60 60
61 emulated = kvmppc_get_last_inst(vcpu, false, &inst); 61 emulated = kvmppc_get_last_inst(vcpu, INST_GENERIC, &inst);
62 if (emulated != EMULATE_DONE) 62 if (emulated != EMULATE_DONE)
63 return emulated; 63 return emulated;
64 64
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index ecf057551a2f..c1f8f53cd312 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -294,7 +294,7 @@ int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu)
294 { 294 {
295 u32 last_inst; 295 u32 last_inst;
296 296
297 kvmppc_get_last_inst(vcpu, false, &last_inst); 297 kvmppc_get_last_inst(vcpu, INST_GENERIC, &last_inst);
298 /* XXX Deliver Program interrupt to guest. */ 298 /* XXX Deliver Program interrupt to guest. */
299 pr_emerg("%s: emulation failed (%08x)\n", __func__, last_inst); 299 pr_emerg("%s: emulation failed (%08x)\n", __func__, last_inst);
300 r = RESUME_HOST; 300 r = RESUME_HOST;