qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 09/13] tpm: Introduce condition to notify wai


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH v3 09/13] tpm: Introduce condition to notify waiters of completed command
Date: Wed, 27 Dec 2017 09:17:51 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 12/22/2017 08:24 AM, Marc-André Lureau wrote:
On Fri, Nov 10, 2017 at 3:11 PM, Stefan Berger
<address@hidden> wrote:
Introduce a lock and a condition to notify anyone waiting for the completion
of the execution of a TPM command by the backend (thread). The backend
uses the condition to signal anyone waiting for command completion.
We need to place the condition in two locations: one is invoked by the
backend thread, the other by the bottom half thread.
We will use the signaling to wait for command completion before VM
suspend.

Signed-off-by: Stefan Berger <address@hidden>
---
  hw/tpm/tpm_tis.c | 12 ++++++++++++
  1 file changed, 12 insertions(+)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 035c6ef..86e9a92 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -80,6 +80,9 @@ typedef struct TPMState {
      TPMVersion be_tpm_version;

      size_t be_buffer_size;
+
+    QemuMutex state_lock;
+    QemuCond cmd_complete;
Looks like the cond is unused in the following patches.

You are right. I will drop this patch. It may have been needed before the refactoring you did.

   Stefan




reply via email to

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