qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 19/19] Qemu-Xen-vTPM: QEMU machine class is initiali


From: Emil Condrea
Subject: [Qemu-devel] [PATCH 19/19] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
Date: Sun, 10 Jul 2016 14:47:50 +0300

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

Signed-off-by: Quan Xu <address@hidden>
Signed-off-by: Emil Condrea <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
---
 vl.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/vl.c b/vl.c
index 5cd0f2a..a22b0c9 100644
--- a/vl.c
+++ b/vl.c
@@ -4353,12 +4353,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);
@@ -4477,6 +4471,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
+
     /* Check if IGD GFX passthrough. */
     igd_gfx_passthru();
 
-- 
1.9.1




reply via email to

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