Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
PATCH v2 4/4 Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init()
Signed-off-by Quan Xu <[email protected]>
--- vl.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
vl.c +10 -6
@@ -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 );
Signature · 1 line
1.8.3.2