On 28/07/2015 21:06, Steve Rutherford wrote:
>>> > > +static inline int pic_in_kernel(struct kvm *kvm)
>>> > > +{
>>> > > + int ret;
>>> > > +
>>> > > + ret = (pic_irqchip(kvm) != NULL);
>>> > > + smp_rmb();
>> >
>> > What does this memory barrier pair with? I don't think it's necessary.
> To be honest, it's probably not necessary. I couldn't find why
> irqchip_in_kernel (which this function is more or less a copy of)
> needed it's memory barrier, so I cargo culted this one in.
It's for stuff like injecting an interrupt before any CPU is created,
while another thread is doing KVM_CREATE_IRQCHIP. In your case a VCPU
has been created so you don't need it (the synchronization point is the
mutex_lock(&kvm->lock) in kvm_vm_ioctl_create_vcpu).
Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html