Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae21216b authored by Alexander Graf's avatar Alexander Graf Committed by Avi Kivity
Browse files

KVM: PPC: align vcpu_kick with x86



Our vcpu kick implementation differs a bit from x86 which resulted in us not
disabling preemption during the kick. Get it a bit closer to what x86 does.

Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 468a12c2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -558,12 +558,17 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)

void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
{
	int me;
	int cpu = vcpu->cpu;

	me = get_cpu();
	if (waitqueue_active(&vcpu->wq)) {
		wake_up_interruptible(vcpu->arch.wqp);
		vcpu->stat.halt_wakeup++;
	} else if (vcpu->cpu != -1) {
	} else if (cpu != me && cpu != -1) {
		smp_send_reschedule(vcpu->cpu);
	}
	put_cpu();
}

int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, struct kvm_interrupt *irq)