qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Implementing atomic SWP in qemu-arm


From: Peter W Schultz
Subject: [Qemu-devel] Implementing atomic SWP in qemu-arm
Date: Wed, 18 Aug 2010 12:15:09 -0700

It is my job to make qemu-arm implement the SWPcc instruction
atomically. Currently, qemu implements this instruction as a load
followed by a store, in a way vulnerable to race conditions.

We are extending qemu to handle a high number of processors, and our
simple testcase using pthreads seems to cause a deadlock somewhere in
qemu. It is the beliefs of my professor and I that the implementation
of SWP is the reason.

How would I go about modifying the qemu source to implement SWP
atomically? I have been studying the source for a few days now, and I
am at a loss as to what all needs to be done.

I feel it would be most desirable to add a TCG_SWAP instruction that
is guaranteed to be an atomic compare-and-swap, and implement that as
needed.

Best,
Kaedenn

-- 
Undergraduate Student
University of California, Santa Cruz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]