Skip to content

Commit

Permalink
KVM: PPC: protect use of kvmppc_h_pr
Browse files Browse the repository at this point in the history
kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
Andreas Schwab authored and Avi Kivity committed Dec 26, 2011
1 parent 36cc66d commit 96f38d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,12 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
ulong cmd = kvmppc_get_gpr(vcpu, 3);
int i;

#ifdef CONFIG_KVM_BOOK3S_64_PR
if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) {
r = RESUME_GUEST;
break;
}
#endif

run->papr_hcall.nr = cmd;
for (i = 0; i < 9; ++i) {
Expand Down

0 comments on commit 96f38d7

Please sign in to comment.