On 02/21/2012 11:34 PM, Michael S. Tsirkin wrote:
On Tue, Feb 21, 2012 at 07:21:28PM -0500, Stefan Berger wrote:
On 02/21/2012 06:08 PM, Michael S. Tsirkin wrote:


The locking times are short since no major computations
are done while the lock is held.
Considering that the TPM TIS interface is a non-DMA, byte-by-byte
send/receive interface, the performance problems, if at all a
problem, are to be found somewhere else : VMExits for example; if
interface is used in polling mode, then the interval between polls.

    Stefan
In that case, you can take the qemu lock in your backend
and avoid locking in the frontend completely.

Maybe it's just me, but I prefer to have locks around the code that has the criticial section, rather than entering a function with locks held, especially since it would be in a different file (backend) where the lock then is grabbed.
Also I do need a lock in the frontend for the condition that is used there.

    Stefan



Reply via email to