diff options
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 6a8c32ec4173..07b89c711898 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -643,7 +643,7 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) | |||
643 | local_irq_enable(); | 643 | local_irq_enable(); |
644 | kvm_vcpu_block(vcpu); | 644 | kvm_vcpu_block(vcpu); |
645 | clear_bit(KVM_REQ_UNHALT, &vcpu->requests); | 645 | clear_bit(KVM_REQ_UNHALT, &vcpu->requests); |
646 | local_irq_disable(); | 646 | hard_irq_disable(); |
647 | 647 | ||
648 | kvmppc_set_exit_type(vcpu, EMULATED_MTMSRWE_EXITS); | 648 | kvmppc_set_exit_type(vcpu, EMULATED_MTMSRWE_EXITS); |
649 | r = 1; | 649 | r = 1; |
@@ -688,13 +688,12 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
688 | return -EINVAL; | 688 | return -EINVAL; |
689 | } | 689 | } |
690 | 690 | ||
691 | local_irq_disable(); | ||
692 | s = kvmppc_prepare_to_enter(vcpu); | 691 | s = kvmppc_prepare_to_enter(vcpu); |
693 | if (s <= 0) { | 692 | if (s <= 0) { |
694 | local_irq_enable(); | ||
695 | ret = s; | 693 | ret = s; |
696 | goto out; | 694 | goto out; |
697 | } | 695 | } |
696 | /* interrupts now hard-disabled */ | ||
698 | 697 | ||
699 | #ifdef CONFIG_PPC_FPU | 698 | #ifdef CONFIG_PPC_FPU |
700 | /* Save userspace FPU state in stack */ | 699 | /* Save userspace FPU state in stack */ |
@@ -1187,12 +1186,11 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
1187 | * aren't already exiting to userspace for some other reason. | 1186 | * aren't already exiting to userspace for some other reason. |
1188 | */ | 1187 | */ |
1189 | if (!(r & RESUME_HOST)) { | 1188 | if (!(r & RESUME_HOST)) { |
1190 | local_irq_disable(); | ||
1191 | s = kvmppc_prepare_to_enter(vcpu); | 1189 | s = kvmppc_prepare_to_enter(vcpu); |
1192 | if (s <= 0) { | 1190 | if (s <= 0) |
1193 | local_irq_enable(); | ||
1194 | r = (s << 2) | RESUME_HOST | (r & RESUME_FLAG_NV); | 1191 | r = (s << 2) | RESUME_HOST | (r & RESUME_FLAG_NV); |
1195 | } else { | 1192 | else { |
1193 | /* interrupts now hard-disabled */ | ||
1196 | kvmppc_fix_ee_before_entry(); | 1194 | kvmppc_fix_ee_before_entry(); |
1197 | } | 1195 | } |
1198 | } | 1196 | } |