KVM: PPC: protect use of kvmppc_h_pr
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 8 Nov 2011 07:17:39 +0000 (07:17 +0000)
committerAvi Kivity <avi@redhat.com>
Mon, 26 Dec 2011 11:28:01 +0000 (13:28 +0200)
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>
arch/powerpc/kvm/book3s_pr.c

index 3c791e1eb675299c96e7b428b499e7bec4e5f434..e2cfb9e1e20ebdea21c726e946e1f37aef1c8c6f 100644 (file)
@@ -658,10 +658,12 @@ program_interrupt:
                        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) {