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

Re: [Xen-devel] [PATCH v3] x86/VPMU: Clear last_vcpu when destroying VPMU



On 12/17/2014 12:28 PM, Jan Beulich wrote:
Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 12/17/14 4:10 PM >>>
+    /* Need to clear last_vcpu in case it points to v */
+    (void)cmpxchg(last, v, NULL);
In a (later) reply to v2 I had indicated that it doesn't seem safe to so here but
rely on an IPI in the other path altering that value. Can you explain why you
think this is safe without changing the others to CPU-atomic accesses too?


So the local access to last_vcpu in vpmu_load() may be still raced on (I was thinking that access in vpmu_load() would on the same processor as vpmu_destroy(), which is obviously not the case).

So I will have to go back to IPI (I don't want to use cmpxchg in vpmu_load()).

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.