qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead of TIS device
Date: Tue, 10 Oct 2017 16:47:38 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 10/10/2017 04:21 PM, Eduardo Habkost wrote:
On Tue, Oct 10, 2017 at 12:56:18AM +0200, Marc-André Lureau wrote:
[...]
-static inline TPMVersion tpm_get_version(void)
+static inline TPMIf *tpm_find(void)
  {
-#ifdef CONFIG_TPM
-    Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
+    Object *obj = object_resolve_path_type("", TYPE_TPM_IF, NULL);
Considering that tpm_crb_realizefn() will rely on tpm_find()
returning NULL if there are multiple TPM devices, I suggest
adding a "returns NULL unless there is exactly one TPM device"
comment, just like fw_cfg_find() and find_vmgenid_dev()

I wonder whether the function couldn't have a better name. tpm_find_single() ?

   Stefan


+
+    return TPM_IF(obj);
+}
[...]





reply via email to

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