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: Wed, 27 Feb 2013 11:16:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 02/27/2013 11:07 AM, Corey Bryant wrote:

On 02/26/2013 07:18 PM, Stefan Berger wrote:
On 02/26/2013 04:58 PM, Corey Bryant wrote:
I spent some time testing this patch series and just about everything
is working as expected.  Part of the testing included running Trousers
and the Trousers testsuite and they behaved as expected.  However I
did find a few minor issues (and a couple of nits) so I'll expand on
those inline.

Assuming these issues get fixed though, I think the patches look good
and should be considered ready to merge.  That is my opinion at least.

On 02/21/2013 11:33 AM, Stefan Berger wrote:
This patch adds support for TPM command line options.
The command line options supported here are

./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id>
             -device tpm-tis,tpmdev=<id>

and

./qemu-... -tpmdev help

where the latter works similar to -soundhw help and shows a list of
available TPM backends (for example 'passthrough').

Using the type parameter, the backend is chosen, i.e., 'passthrough'
for the
passthrough driver. The interpretation of the other parameters along
with determining whether enough parameters were provided is pushed into
the backend driver, which needs to implement the interface function
'create' and return a TPMDriver structure if the VM can be started or
'NULL'
s/TPMDriver/TPMDriverOps
Fixed

(qemu) info tpm
TPM devices:
   tpm0: model=tpm-tis
    \ tpm0:
type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel


As we discussed offline, the code allows a guest to be started with a
backend and no frontend.  For example:

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:

I think you want to stick with tpmdev rather than id.  It looks like id should 
be the identifier for the option it is specified with.  So in this case it 
should really represent the passthrough device.

-device tpm-tis,tpmdev=tpm0 was used to link to the -tpmdev passthrough,id=tpm0. However, not passing an id in device has the negative side effect that it cannot be searched for using the qemu_opts_find() function. So I think it is the right thing to do to force users to provide the id -> -device tpm-tis,id=tpm0.


   Stefan




reply via email to

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