qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options
Date: Sun, 4 Sep 2011 19:50:18 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

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