Received: from eggs.gnu.org ([140.186.70.92]:42538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs2Jy-0000hF-Ou for qemu-devel@nongnu.org; Mon, 30 Jan 2012 20:15:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rs2Jv-0001w9-7b for qemu-devel@nongnu.org; Mon, 30 Jan 2012 20:15:42 -0500 Received: from indium.canonical.com ([91.189.90.7]:42242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs2Jv-0001w5-3O for qemu-devel@nongnu.org; Mon, 30 Jan 2012 20:15:39 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Rs2Ju-0001Yk-1Z for ; Tue, 31 Jan 2012 01:15:38 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 067792E8043 for ; Tue, 31 Jan 2012 01:15:38 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 31 Jan 2012 01:09:01 -0000 From: Yongjie Ren <913774@bugs.launchpad.net> Sender: bounces@canonical.com References: <20120109132541.29020.62420.malonedeb@gac.canonical.com> Message-Id: <20120131010901.22905.15441.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 913774] Re: device can't be hot-removed from the guest Reply-To: Bug 913774 <913774@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org fixed by the following commit. commit 024a6fbdb9d8cbc4d7f833b23db51c9d1004bc47 Author: Anthony Liguori Date: Fri Jan 13 07:45:55 2012 -0600 qdev: fix device_del by refactoring reference counting Commit 8eb0283 broken device_del by having too overzealous reference co= unting checks. Move the reference count checks to qdev_free(), make sure to r= emove the parent link on free, and decrement the reference count on property = removal. ** Changed in: qemu Status: New =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/913774 Title: device can't be hot-removed from the guest Status in QEMU: Fix Released Bug description: Environment: ------------ Host OS (ia32/ia32e/IA64): ia32e Guest OS (ia32/ia32e/IA64): ia32e Guest OS Type (Linux/Windows): Linux(RHEL6u1) kvm.git Commit: ff92e9b5571b34f53cbfde0899cf6e6a579cb3fa qemu-kvm Commit: aad3b517a1b83561f2755dc4451596a421399c19 Host Kernel Version: 3.2.0-rc7 Hardware: Romley-EP, WSM-EP = Bug detailed description: -------------------------- Using the latest qemu-kvm and kvm upstream, PCI device can't be hot-remov= ed from the guest. I try to remove a VF, but the device can't be removed. The VF in guest st= ill has IP, and its network is fine. A normal NIC will have the same issue. From my test, this should be a qemu-kvm bug. kvm + qemu-kvm =3D result ff92e9b5 + aad3b517 =3D bad = ff92e9b5 + fcfeed4a =3D good some logs are attached. Reproduce steps: ---------------- 1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad= 3b517 ) 2. qemu-system-x86_64 -m 512 -smp 1 =E2=80=93hda /root/rhel6u1.img 3. ctrl+Alt+2 (switch to monitor) 4. device_add pci-assign,host=3D09:10.0,id=3Dnic (hot-add a VF) 5. ctrl+Alt+1 6. check the device can get IP 7. ctrl+Alt+2 8. device_del nic (try to detach the VF) = Current result: ---------------- Cannot hot-remove the device. Expected result: ---------------- The device can be hot-removed. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/913774/+subscriptions