]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Fix libvirt hang due to early TPM device stop
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 19 Feb 2021 15:57:41 +0000 (10:57 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 19 Feb 2021 16:31:37 +0000 (17:31 +0100)
commitf30aa2ec74a79f34700915b677f46ec476d2362d
tree7132b5ad97bd592fcd63e1312e68408a90efb023
parent4fc755bec1c90133e996bbd9bc1894a7fac305d5
qemu: Fix libvirt hang due to early TPM device stop

This patch partially reverts commit 5cde9dee where the qemuExtDevicesStop()
was moved to a location before the QEMU process is stopped. It may be
alright to tear down some devices before QEMU is stopped, but it doesn't work
for the external TPM (swtpm) which assumes that QEMU sends it a signal to stop
it before libvirt may try to clean it up. So this patch moves the
virFileDeleteTree() calls after the call to qemuExtDevicesStop() so that the
pid file of virtiofsd is not deleted before that call.

Afftected libvirt versions are 6.10 and 7.0.

Fixes: 5cde9dee8c70b17c458d031ab6cf71dce476eea2
Cc: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_process.c