qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V25 1/7] Support for TPM command line options


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH V25 1/7] Support for TPM command line options
Date: Tue, 26 Feb 2013 20:07:19 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

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

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