qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] Qemu-Xen-vTPM: QEMU machine class is initia


From: Xu, Quan
Subject: Re: [Qemu-devel] [PATCH 4/4] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Thu, 6 Nov 2014 17:16:11 +0000


> -----Original Message-----
> From: Paolo Bonzini [mailto:address@hidden On Behalf Of Paolo
> Bonzini
> Sent: Monday, November 03, 2014 8:22 PM
> To: Xu, Quan; address@hidden
> Cc: address@hidden; address@hidden
> Subject: Re: [PATCH 4/4] Qemu-Xen-vTPM: QEMU machine class is initialized
> before tpm_init()
> 
> On 02/11/2014 07:39, Quan Xu wrote:
> > make sure QEMU machine class is initialized and QEMU has registered
> > Xen stubdom vTPM driver when call tpm_init() [vl.c]
> >
> > Signed-off-by: Quan Xu <address@hidden>
> > ---
> >  vl.c | 16 ++++++++++------
> >  1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/vl.c b/vl.c
> > index f6b3546..dd437e1 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -4114,12 +4114,6 @@ int main(int argc, char **argv, char **envp)
> >          exit(1);
> >      }
> >
> > -#ifdef CONFIG_TPM
> > -    if (tpm_init() < 0) {
> > -        exit(1);
> > -    }
> > -#endif
> > -
> >      /* init the bluetooth world */
> >      if (foreach_device_config(DEV_BT, bt_parse))
> >          exit(1);
> > @@ -4225,6 +4219,16 @@ int main(int argc, char **argv, char **envp)
> >              exit(1);
> >      }
> >
> > +    /* For compatible with Xen stubdom vTPM driver, make
> > +     * sure QEMU machine class is initialized and QEMU has
> > +     * registered Xen stubdom vTPM driver ..
> > +    */
> > +#ifdef CONFIG_TPM
> > +    if (tpm_init() < 0) {
> > +        exit(1);
> > +    }
> > +#endif
> > +
> >      /* init generic devices */
> >      if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func,
> NULL, 1) != 0)
> >          exit(1);
> >
> 
> Assuming you tested the non-Xen TPM backend, this is okay.

Yes, I have tested Qemu TPM passthrough in KVM virtual machine. It is working ..

> 
> Paolo



reply via email to

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