aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/booke.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r--arch/powerpc/kvm/booke.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index b2c8c423c4d5..13e0747178e3 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -338,7 +338,15 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
338 break; 338 break;
339 339
340 case BOOKE_INTERRUPT_SYSCALL: 340 case BOOKE_INTERRUPT_SYSCALL:
341 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_SYSCALL); 341 if (!(vcpu->arch.shared->msr & MSR_PR) &&
342 (((u32)kvmppc_get_gpr(vcpu, 0)) == KVM_SC_MAGIC_R0)) {
343 /* KVM PV hypercalls */
344 kvmppc_set_gpr(vcpu, 3, kvmppc_kvm_pv(vcpu));
345 r = RESUME_GUEST;
346 } else {
347 /* Guest syscalls */
348 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_SYSCALL);
349 }
342 kvmppc_account_exit(vcpu, SYSCALL_EXITS); 350 kvmppc_account_exit(vcpu, SYSCALL_EXITS);
343 r = RESUME_GUEST; 351 r = RESUME_GUEST;
344 break; 352 break;