qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V14 2/7] Add TPM (frontend) hardware interface (


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH V14 2/7] Add TPM (frontend) hardware interface (TPM TIS) to Qemu
Date: Wed, 22 Feb 2012 10:03:03 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.15

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

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