The guest will be destroyed after hot remove the VF from the guest.

Bug #1354279 reported by chao zhou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):Linux
kvm.git Commit:9f6226a762c7ae02f6a23a3d4fc552dafa57ea23
qemu.git Commit:5a7348045091a2bc15d85bb177e5956aa6114e5a
Host Kernel Version:3.16.0-rc1
Hardware:Romley_EP, Ivytown_EP,Haswell_EP

Bug detailed description:
--------------------------
hot add the VF to the guest, then hot remove the VF from the guest, the guest will be destroyed.

note:
1. when hot add the VF with vfio, the hot remove the VF from the guest, the guest works fine.
2. this shoule be a qemu bug:
kvm + qemu = result
9f6226a7 + 5a734804 = bad
9f6226a7 + 9f862687 = good

Reproduce steps:
----------------
1. create guest
qemu-system-x86_64 --enable-kvm -m 1024 -smp 4 -net none rhel6u5.qcow -monitor pty
2. hot add the vf to guest
echo "device_add pci-assign,host=05:10.0,id=nic" >/dev/pts/x
cat /dev/pts/x
3. hot remove the VF froem guest
echo "device_del nic" >/dev/pts/x

Current result:
----------------
the guest willl be destroyed after hot remove the VF from the guest

Expected result:
----------------
the guest works fine after hot remove the VF from the guest

Basic root-causing log:
----------------------
[root@vt-snb9 qemu.git]# qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 -net none rhel6u5.qcow -monitor pty
VNC server running on `::1:5900'
**
ERROR:qom/object.c:725:object_unref: assertion failed: (obj->ref > 0)
Aborted (core dumped)

Revision history for this message
chao zhou (chao-zhou) wrote :

the first bad commit is:
commit 22a893e4f55344f96e1aafc66f5fedc491a5ca97
Author: Paolo Bonzini <email address hidden>
Date: Wed Jun 11 10:58:06 2014 +0200

    memory: MemoryRegion: replace owner field with QOM parent

    The two are now the same.

    Reviewed-by: Peter Crosthwaite <email address hidden>
    Signed-off-by: Paolo Bonzini <email address hidden>

Revision history for this message
chao zhou (chao-zhou) wrote :

test on Ivytown_EP
kvm.git + qemu.git: c77dcacb_0e4a7737
kernel version: 3.16.0
after hot remove the VF from the guest, the guest works fine.

Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.