qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Quan Xu <quan.xu@intel.com>, qemu-devel@nongnu.org
Cc: aliguori@amazon.com, xen-devel@lists.xen.org
Subject: Re: [Qemu-devel] [PATCH 4/4] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Mon, 03 Nov 2014 13:22:17 +0100	[thread overview]
Message-ID: <54577379.3060009@redhat.com> (raw)
In-Reply-To: <1414910371-27794-1-git-send-email-quan.xu@intel.com>

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 <quan.xu@intel.com>
> ---
>  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.

Paolo

  reply	other threads:[~2014-11-03 12:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02  6:39 [Qemu-devel] [PATCH 4/4] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init() Quan Xu
2014-11-03 12:22 ` Paolo Bonzini [this message]
2014-11-06 17:16   ` Xu, Quan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54577379.3060009@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quan.xu@intel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).