From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0FtN-0001AB-MZ for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:49:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0FtM-0007qK-MS for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:49:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0FtM-0007qG-CZ for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:49:56 -0400 Date: Sun, 4 Sep 2011 19:50:18 +0300 From: "Michael S. Tsirkin" Message-ID: <20110904165017.GE12745@redhat.com> References: <20110831143551.127339744@linux.vnet.ibm.com> <20110831143616.411365666@linux.vnet.ibm.com> <20110901171432.GD10989@redhat.com> <4E602AEC.8070805@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E602AEC.8070805@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: chrisw@redhat.com, anbang.ruan@cs.ox.ac.uk, qemu-devel@nongnu.org, rrelyea@redhat.com, alevy@redhat.com, andreas.niederl@iaik.tugraz.at, serge@hallyn.com On Thu, Sep 01, 2011 at 09:01:32PM -0400, Stefan Berger wrote: > >>Monitor support for 'info tpm' has been added. It for example prints the > >>following: > >> > >>TPM devices: > >> builtin: model=tpm-tis,id=tpm0 > >This mixes frontend and backend properties. > > > There's currently only one frontend 'model' and that's the > 'tpm-tis'. In case someone would want to write a virtio equivalent > it would show the that the 'builtin' backend is connected to the > 'virtio' frontend model. If above is not correct, how should it look > like? E.g. for net: we list backends and frontends each with its properties. virtio-net-pci.0: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ foo: type=tap,ifname=msttap0,script=/home/mst/ifup,downscript=no > >>+ > >>+ value = qemu_opt_get(opts, "type"); > >>+ if (!value) { > >>+ qerror_report(QERR_MISSING_PARAMETER, "type"); > >>+ tpm_display_backend_drivers(stderr); > >>+ return 1; > >>+ } > >>+ > >>+ be = tpm_get_backend_driver(value); > >>+ if (be == NULL) { > >>+ qerror_report(QERR_INVALID_PARAMETER_VALUE, "type", > >>+ "a tpm backend type"); > >>+ tpm_display_backend_drivers(stderr); > >>+ return 1; > >>+ } > >>+ > >>+ assert((is_tpmdev&& model == NULL) || (!is_tpmdev&& model != NULL)); > >Why isn't this using qdev for parameter passing? > > > Can you point me to a device that is using qdev for parameter > passing. virtio-pci devices: block, net - have a huge number of these. I'm talking about frontend primarily. > Also this part is very similar to how the networking works > (net.c). > > Stefan A large part of that is legacy processing. -- MST