KVM: PPC: protect use of kvmppc_h_pr

Submitted by Andreas Schwab on Nov. 8, 2011, 5:17 p.m.

Details

Message ID m27h3apm8c.fsf_-_@igel.home
State Not Applicable
Headers show

Commit Message

Andreas Schwab Nov. 8, 2011, 5:17 p.m.
kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
 arch/powerpc/kvm/book3s_pr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Alexander Graf Nov. 11, 2011, 4:03 p.m.
On 11/08/2011 06:17 PM, Andreas Schwab wrote:
> kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR.
>
> Signed-off-by: Andreas Schwab<schwab@linux-m68k.org>

Thanks, applied to kvm-ppc-next.


Alex

Patch hide | download patch | download mbox

diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
index bc4d50d..05473b5 100644
--- a/arch/powerpc/kvm/book3s_pr.c
+++ b/arch/powerpc/kvm/book3s_pr.c
@@ -660,10 +660,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) {