]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: prevent termination of guests w/hostdev on driver reconnect
authorLaine Stump <laine@laine.org>
Fri, 31 May 2013 18:30:09 +0000 (14:30 -0400)
committerLaine Stump <laine@laine.org>
Fri, 31 May 2013 18:57:55 +0000 (14:57 -0400)
commit2ea45647bcde23cff5da48f725561ff5ba3fba39
tree90db3d336fa5c48d8475dbc15d897607f66f2739
parentaeef20e94b3a1274d82777057ba14e68b7582c16
qemu: prevent termination of guests w/hostdev on driver reconnect

This should resolve:

  https://bugzilla.redhat.com/show_bug.cgi?id=959191

The problem was that qemuUpdateActivePciHostdevs was returning 0
(success) when no hostdevs were present, but would otherwise return -1
(failure) even when it completed successfully. It is only called from
qemuProcessReconnect(), and when qemuProcessReconnect got back an
error, it would not only stop reconnecting, but would terminate the
guest qemu process "to remove danger of it ending up running twice if
user tries to start it again later".

(This bug was introduced in commit 011cf7ad, which was pushed between
v1.0.2 and v1.0.3, so all maintenance branches from v1.0.3 up to 1.0.5
will need this one line patch applied.)
src/qemu/qemu_hostdev.c