On Tue, Feb 21, 2012 at 05:30:32PM -0500, Stefan Berger wrote:
At the moment there are two backends that need threading: the
libtpms and passthrough backends. Both will require locking of
datastructures that belong to the frontend. Only the null driver
doesn't need a thread and the main thread can call into the backend,
create the response and call via callback into the frontend to
deliver the repsonse. If structures are protected via mutxes then
only the NULL driver (which we don't want anyway) may end up
grabbing mutexes that really aren't necessary while the two other
backends need them. I don't see the mitextes as problematic. The
frontend at least protects its data structures for the callbacks and
other API calls it offers and they simply are thread-safe.
Stefan
Worst case, you can take a qemu mutex. Is tpm very
performance-sensitive to make contention on that
lock a problem?