qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Quan Xu <quan.xu@intel.com>
To: stefano.stabellini@eu.citrix.com, stefanb@linux.vnet.ibm.com,
	qemu-devel@nongnu.org
Cc: wei.liu2@citrix.com, dgdegra@tycho.nsa.gov,
	Quan Xu <quan.xu@intel.com>,
	xen-devel@lists.xen.org
Subject: [Qemu-devel] [PATCH v7 6/6] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Mon, 11 May 2015 04:43:14 -0400	[thread overview]
Message-ID: <1431333794-28761-7-git-send-email-quan.xu@intel.com> (raw)
In-Reply-To: <1431333794-28761-1-git-send-email-quan.xu@intel.com>

make sure QEMU machine class is initialized and QEMU has registered
Xen stubdom vTPM driver when call tpm_init()

Signed-off-by: Quan Xu <quan.xu@intel.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
 vl.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/vl.c b/vl.c
index 74c2681..7bc87f1 100644
--- a/vl.c
+++ b/vl.c
@@ -4131,12 +4131,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);
@@ -4239,6 +4233,17 @@ 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);
-- 
1.8.3.2

      parent reply	other threads:[~2015-05-11 13:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11  8:43 [Qemu-devel] [PATCH v7 0/6] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part) Quan Xu
2015-05-11  8:43 ` [Qemu-devel] [PATCH v7 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Quan Xu
2015-05-11  8:43 ` [Qemu-devel] [PATCH v7 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure Quan Xu
2015-05-11  8:43 ` [Qemu-devel] [PATCH v7 3/6] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver Quan Xu
2015-05-11  8:43 ` [Qemu-devel] [PATCH v7 4/6] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c Quan Xu
2015-05-11  8:43 ` [Qemu-devel] [PATCH v7 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen Quan Xu
2015-05-11  8:43 ` Quan Xu [this message]

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=1431333794-28761-7-git-send-email-quan.xu@intel.com \
    --to=quan.xu@intel.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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).