diff options
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index cfd7fe5c3a62..5cb5f0d9381f 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -947,10 +947,10 @@ program_interrupt: | |||
947 | break; | 947 | break; |
948 | } | 948 | } |
949 | case BOOK3S_INTERRUPT_SYSCALL: | 949 | case BOOK3S_INTERRUPT_SYSCALL: |
950 | // XXX make user settable | ||
951 | if (vcpu->arch.osi_enabled && | 950 | if (vcpu->arch.osi_enabled && |
952 | (((u32)kvmppc_get_gpr(vcpu, 3)) == OSI_SC_MAGIC_R3) && | 951 | (((u32)kvmppc_get_gpr(vcpu, 3)) == OSI_SC_MAGIC_R3) && |
953 | (((u32)kvmppc_get_gpr(vcpu, 4)) == OSI_SC_MAGIC_R4)) { | 952 | (((u32)kvmppc_get_gpr(vcpu, 4)) == OSI_SC_MAGIC_R4)) { |
953 | /* MOL hypercalls */ | ||
954 | u64 *gprs = run->osi.gprs; | 954 | u64 *gprs = run->osi.gprs; |
955 | int i; | 955 | int i; |
956 | 956 | ||
@@ -959,8 +959,13 @@ program_interrupt: | |||
959 | gprs[i] = kvmppc_get_gpr(vcpu, i); | 959 | gprs[i] = kvmppc_get_gpr(vcpu, i); |
960 | vcpu->arch.osi_needed = 1; | 960 | vcpu->arch.osi_needed = 1; |
961 | r = RESUME_HOST_NV; | 961 | r = RESUME_HOST_NV; |
962 | 962 | } else if (!(vcpu->arch.shared->msr & MSR_PR) && | |
963 | (((u32)kvmppc_get_gpr(vcpu, 0)) == KVM_SC_MAGIC_R0)) { | ||
964 | /* KVM PV hypercalls */ | ||
965 | kvmppc_set_gpr(vcpu, 3, kvmppc_kvm_pv(vcpu)); | ||
966 | r = RESUME_GUEST; | ||
963 | } else { | 967 | } else { |
968 | /* Guest syscalls */ | ||
964 | vcpu->stat.syscall_exits++; | 969 | vcpu->stat.syscall_exits++; |
965 | kvmppc_book3s_queue_irqprio(vcpu, exit_nr); | 970 | kvmppc_book3s_queue_irqprio(vcpu, exit_nr); |
966 | r = RESUME_GUEST; | 971 | r = RESUME_GUEST; |