On Friday 25 April 2008 00:56:04 Jerone Young wrote: > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -212,6 +212,9 @@ static void kvmppc_decrementer_func(unsi > { > struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data; > > + if (waitqueue_active(&vcpu->wq)) > + wake_up_interruptible(&vcpu->wq); > + > kvmppc_queue_exception(vcpu, BOOKE_INTERRUPT_DECREMENTER); > }
Hooray! > int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, struct kvm_interrupt *irq) > { > + vcpu_load(vcpu); > kvmppc_queue_exception(vcpu, BOOKE_INTERRUPT_EXTERNAL); > + vcpu_put(vcpu); > + > return 0; > } load/put here is definitely unnecessary. That makes me question how necessary it is in other parts of this patch too. I think the (hardware) TLB is the only state we really need to worry about, because there is no other state that our guest can load into the hardware that is not handled by a regular context switch. If that's true, we should only need vcpu_load/put() on paths where we muck with the TLB behind the host's back, and that is only in the run path. -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel