On 02/26/2013 07:18 PM, Stefan Berger wrote:
On 02/26/2013 04:58 PM, Corey Bryant wrote:
qemu-system-x86_64 -tpmdev passthrough,id=tpm0,path=/dev/tpm0

(It's missing -device tpm-tis,tpmdev=tpm0)


So with the necessary filtering this will then have to be -device tpm-tis,tpmdev=tpm0,id=tpm0 . I am not sure whether there is a better way of doing this. If there is, can someone please let me know? I need tpmdev=tpm0 to fill the Properties of the tpm_tis driver, which it uses to find the backend with the above 'id=tpm0'.For the hmp and qmp code to display the proper data and filter the above mention case I would then use the following patch:


[...]

     TPMInfoList *info, *head = NULL, *cur_item = NULL;

     QLIST_FOREACH(drv, &tpm_backends, list) {
+        if (!tpm_find_frontend(drv->id)) {
+            continue;
+        }
         info = g_new0(TPMInfoList, 1);
         info->value = qmp_query_tpm_inst(drv);


I need to use 'tpm0' as search key in qemu_find_opts() which in turn requires that the device has id=tpm0 given.


Argh, DeviceState's id holds the id of the device. So this got a lot simpler and -device tpm-tis,tpmdev=tpm0,... is not needed anymore, but now it should be -device tpm-tis,id=tpm

   Stefan


Reply via email to