Re: [PATCH v4 4/4] KVM: PPC: e500: Save/restore SPE state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> On Thu, 31 Mar 2011 00:43:27 +0200
> Alexander Graf <agraf@xxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux