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]

 



On 2013-03-14 16:08, Paolo Bonzini wrote:
> 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);
> 
> ?

Isn't there any per-cpu info encoded in idx?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
--
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