Re: [PATCH] KVM: VMX: Do not overwrite vcpu->srcu_idx in vmx_vcpu_reset

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

 



Il 14/03/2013 16:03, Jan Kiszka ha scritto:
>> > vcpu->srcu_idx = srcu_read_lock()
>> >   idx = srcu_read_lock(&vcpu->kvm->srcu); 
>> >    srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
>> >    vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
>> >   srcu_read_unlock(&vcpu->kvm->srcu, idx);
>> > srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
>> > 
>> > Not sure this is valid.
> Grmbl, likely not.

It might be.

Isn't it the same as two different CPUs doing

CPU 1                                                 CPU 2
------------------------------------------------------------------------------------------------

vcpu->srcu_idx = srcu_read_lock()
                                                      idx = srcu_read_lock(&vcpu->kvm->srcu); 
srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
                                                      srcu_read_unlock(&vcpu->kvm->srcu, idx);
srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);

?

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux