From: Quan Xu <quan.xu@intel.com>
To: stefano.stabellini@eu.citrix.com, stefanb@linux.vnet.ibm.com,
eblake@redhat.com
Cc: wei.liu2@citrix.com, Quan Xu <quan.xu@intel.com>,
qemu-devel@nongnu.org, xen-devel@lists.xen.org,
aliguori@amazon.com, pbonzini@redhat.com, dgdegra@tycho.nsa.gov
Subject: [Qemu-devel] [PATCH v5 5/6] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Fri, 10 Apr 2015 02:59:18 -0400 [thread overview]
Message-ID: <1428649159-30879-6-git-send-email-quan.xu@intel.com> (raw)
In-Reply-To: <1428649159-30879-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
next prev parent reply other threads:[~2015-04-10 12:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 6:59 [Qemu-devel] [PATCH v5 0/6] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU patch) Quan Xu
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Quan Xu
2015-04-10 13:22 ` Eric Blake
2015-04-13 2:32 ` Xu, Quan
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure Quan Xu
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 3/6] " Quan Xu
2015-04-15 14:44 ` Stefan Berger
2015-04-15 15:07 ` Daniel De Graaf
2015-04-16 1:03 ` Xu, Quan
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 4/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen Quan Xu
2015-04-15 14:50 ` Stefan Berger
2015-04-16 1:07 ` Xu, Quan
2015-04-10 6:59 ` Quan Xu [this message]
2015-04-10 6:59 ` [Qemu-devel] [PATCH v5 6/6] Qemu-Xen-vTPM: Add a parameter indicating whether the command that was a selftest Quan Xu
2015-04-12 20:50 ` Stefan Berger
2015-04-13 2:15 ` Xu, Quan
2015-04-15 14:56 ` Stefan Berger
2015-04-16 1:04 ` Xu, Quan
2015-04-13 22:35 ` Stefan Berger
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=1428649159-30879-6-git-send-email-quan.xu@intel.com \
--to=quan.xu@intel.com \
--cc=aliguori@amazon.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--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).