From: Quan Xu <quan.xu@intel.com>
To: stefano.stabellini@eu.citrix.com, qemu-devel@nongnu.org
Cc: wei.liu2@citrix.com, stefanb@linux.vnet.ibm.com,
xen-devel@lists.xen.org, Quan Xu <quan.xu@intel.com>,
dgdegra@tycho.nsa.gov, eblake@redhat.com
Subject: [PATCH v8 7/7] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Sun, 17 May 2015 01:20:30 -0400 [thread overview]
Message-ID: <1431840030-2797-9-git-send-email-quan.xu@intel.com> (raw)
In-Reply-To: <1431840030-2797-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
prev parent reply other threads:[~2015-05-17 5:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 5:20 [PATCH v8 0/7] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part) Quan Xu
2015-05-17 5:20 ` Quan Xu
2015-05-17 5:20 ` [PATCH v8 1/7] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options Quan Xu
2015-05-17 5:20 ` [PATCH v8 2/7] Qemu-Xen-vTPM: Create a new file xen_pvdev.c Quan Xu
2015-06-22 16:37 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.02.1506221732260.4824@kaball.uk.xensource.com>
2015-06-23 6:43 ` Xu, Quan
[not found] ` <945CA011AD5F084CBEA3E851C0AB28890E930C91@SHSMSX101.ccr.corp.intel.com>
2015-06-23 10:56 ` Stefano Stabellini
2016-02-14 5:55 ` Xu, Quan
2015-05-17 5:20 ` [PATCH v8 3/7] Qemu-Xen-vTPM: Xen frontend driver infrastructure Quan Xu
2015-06-22 17:40 ` Stefano Stabellini
2015-05-17 5:20 ` [PATCH v8 4/7] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver Quan Xu
2015-06-22 16:55 ` Stefano Stabellini
2015-05-17 5:20 ` [PATCH v8 5/7] Qemu-Xen-vTPM: Move tpm_passthrough_is_selftest() into tpm_util.c Quan Xu
2015-05-17 5:20 ` [PATCH v8 6/7] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen Quan Xu
2015-05-17 5:20 ` 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=1431840030-2797-9-git-send-email-quan.xu@intel.com \
--to=quan.xu@intel.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=eblake@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).