[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] hvm emul: fix cmpxchg emulation to use an atomic operation
On 06/08/2009 11:40, "Patrick Colp" <Patrick.Colp@xxxxxxxxxx> wrote: > # HG changeset patch > # User Patrick Colp <Patrick.Colp@xxxxxxxxxx> > # Date 1249555177 -3600 > # Node ID 684c8fc69d658d058246eb9edfc8eba187ae6f2c > # Parent 68e8b8379244e293c55875e7dc3692fc81d3d212 > hvm emul: fix cmpxchg emulation to use an atomic operation. > > Currently HVM cmpxchg emulation is done by doing a normal emulated write, > which is not atomic. This patch changes it to use a cmpxchg operation > instead, which is atomic. Has this been causing problems? Also this looks rather similar to some shadow-pagetable code. Why is it not shared? A further problem is that this is a regression for emulated atomic ops to devices. This does happen in some cases (e.g., Linux writes to APIC registers with XCHG in some cases, which will trigger the ->cmpxchg hook). These will now fail outright. Overall, I'm not super-fussed to touch this at all, and certainly not unless code can be shared and fallback paths implemented. If you can share the code in its current location (in shadow code) that would be better for me as it makes the patch smaller. I can then do the trivial code relocation myself as a second patch. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |