On 31.03.2011, at 00:56, Scott Wood wrote:

> On Thu, 31 Mar 2011 00:43:27 +0200
> Alexander Graf <[email protected]> wrote:
> 
>>> @@ -78,6 +79,43 @@ void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu)
>>>     }
>>> }
>>> 
>>> +#ifdef CONFIG_SPE
>>> +static void kvmppc_vcpu_enable_spe(struct kvm_vcpu *vcpu)
>>> +{
>>> +   enable_kernel_spe();
>>> +   kvmppc_load_guest_spe(vcpu);
>> 
>> Are you sure this is only ever called from !preempt code?
> 
> Hmm, I guess not.  We should always have the preempt notifier in place,
> though, so it should suffice to stick preempt_disable/enable() at the
> beginning/end of this function.  If we get preempted after that the
> notifier will clean up.

If we stick preempt_enable()/preempt_disable in the function, preemption will 
be enabled when being disabled before, right? So we wouldn't be able to call 
this from vcpu_load for example, as that occurs within the preempt notifier 
callback.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to