Bug 702574 - device-assignment leaks option ROM memory
Summary: device-assignment leaks option ROM memory
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2011-05-06 07:44 UTC by Chao Yang
Modified: 2011-07-27 18:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-27 18:01:39 UTC
Target Upstream Version:


Attachments (Terms of Use)
lspci info and output of ps --format 'vsz' `pidof qemu-kvm` (14.64 KB, text/plain)
2011-05-06 07:44 UTC, Chao Yang
no flags Details

Description Chao Yang 2011-05-06 07:44:39 UTC
Created attachment 497300 [details]
lspci info and output of ps --format 'vsz' `pidof qemu-kvm`

Description of problem:
Repeatedly added and removed from a guest, the option ROM memory is leaked.
Will attach 82756 lspci info and output of ps --format 'vsz' `pidof qemu-kvm`

Version-Release number of selected component (if applicable):
kvm-83-232.el5

How reproducible:
100%

Steps to Reproduce:
1. unbind nic
# lspci -n -s 04:00.0
04:00.0 0200: 8086:10c9 (rev 01)

echo "8086 10c9" > /sys/bus/pci/drivers/pci-stub/new_id 
echo 0000:04:00.0 > /sys/bus/pci/devices/0000\:04\:00.0/driver/unbind 
echo 0000:04:00.0 > /sys/bus/pci/drivers/pci-stub/bind 

2. boot a guest by
 /usr/libexec/qemu-kvm -M rhel5.6.0 -no-hpet -rtc-td-hack -startdate now -name rhel5.7 -smp 2 -m 2048 -cpu qemu64,+sse2 -uuid `uuidgen` -boot c -net none -drive file=images/win7-64.qcow2,media=disk,if=virtio,cache=none,boot=on,format=qcow2 -vnc :1 -notify all -balloon none -monitor unix:/tmp/chayang-sock,server,nowait

3. repeatedly add and remove
echo "info pci" | nc -U /tmp/chayang-sock
for i in $(seq 5000)
do
echo 
echo "HOTPLUG/HOTUNPLUG times: $i "
echo 
echo "pci_add pci_addr=auto host host=04:00.0" | nc -U /tmp/chayang-sock
sleep 5
echo "pci_del pci_addr=0:4" | nc -U /tmp/chayang-sock
sleep 5
done
  
Actual results:
qemu-kvm memory leaks.

Expected results:


Additional info:
Over 100 times repeatedly add and remove, qemu complains following, but monitor hints successfully hot add/remove.

HOTPLUG/HOTUNPLUG times: 114 

QEMU 0.9.1 monitor - type 'help' for more information
(qemu) pci_add pci_addr=auto host host=04:00.0
Registered host PCI device 04:00.0 ("04:00.0") as guest device 00:04.0
OK domain 0, bus 0, slot 4, function 0
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) pci_del pci_addr=0:4
(qemu) 

assigned_dev_update_msix_mmio: No such device or address
assigned_dev_update_msix_mmio: No such device or address
assigned_dev_update_msix_mmio: No such device or address
assigned_dev_update_msix_mmio: No such device or address
...


Note You need to log in before you can comment on or make changes to this bug.