Skip to contentSkip to conversation

device can't be hot-removed from the guest

Qemu-devel Yongjie Ren 1 participant 6 messages Jan 9, 2012 – Jan 31, 2012

lore
Share & tools
lore
#0 lore raw

Public bug reported:

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-removed from the guest. I try to remove a VF, but the device can't be removed. The VF in guest still has IP, and its network is fine. A normal NIC will have the same issue.

Quoted 1 line

From my test, this should be a qemu-kvm bug.

kvm + qemu-kvm = result
ff92e9b5 + aad3b517 = bad
ff92e9b5 + fcfeed4a = good

some logs are attached.

Reproduce steps:
----------------
1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
3. ctrl+Alt+2 (switch to monitor)
4. device_add pci-assign,host=09:10.0,id=nic (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.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 56 lines
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:
  New

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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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
#1 lore raw

** Attachment added: "guest dmesg log"
https://bugs.launchpad.net/qemu/+bug/913774/+attachment/2664198/+files/dmesg-guest.log

Signature · 56 lines
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:
  New

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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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
#2 lore raw
In reply to Yongjie Ren

** Attachment added: "lspci -vvv in guest"
https://bugs.launchpad.net/qemu/+bug/913774/+attachment/2664205/+files/lspci-guest.log

Signature · 56 lines
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:
  New

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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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
#3 lore raw
In reply to Yongjie Ren

** Attachment added: "host dmesg log"
https://bugs.launchpad.net/qemu/+bug/913774/+attachment/2664196/+files/dmesg-host.log

Signature · 56 lines
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:
  New

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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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
#4 lore raw
In reply to Yongjie Ren

** Attachment added: "lspci -vvv in host"
https://bugs.launchpad.net/qemu/+bug/913774/+attachment/2664197/+files/lspci-host.log

Signature · 56 lines
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:
  New

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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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
#5 lore raw
In reply to Yongjie Ren

fixed by the following commit.

commit 024a6fbdb9d8cbc4d7f833b23db51c9d1004bc47

Author: Anthony Liguori <[email protected]>
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 counting checks. Move the reference count checks to qdev_free(), make sure to remove the parent link on free, and decrement the reference count on property removal.

** Changed in: qemu
Status: New => Fix Released

Signature · 56 lines
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-removed from the guest.
  I try to remove a VF, but the device can't be removed. The VF in guest still 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    =  result
  ff92e9b5 + aad3b517 =  bad 
  ff92e9b5 + fcfeed4a   =  good

  some logs are attached.

  Reproduce steps:
  ----------------
  1. start up a host with kvm(commit: ff92e9b5) and use qmeu-kvm(commit:aad3b517 )
  2. qemu-system-x86_64 -m 512 -smp 1 –hda /root/rhel6u1.img
  3. ctrl+Alt+2  (switch to monitor)
  4. device_add pci-assign,host=09:10.0,id=nic   (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