Bug 702574 - device-assignment leaks option ROM memory
device-assignment leaks option ROM memory
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.7
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Alex Williamson
Virtualization Bugs
:
Depends On:
Blocks: Rhel5KvmTier2
  Show dependency treegraph
 
Reported: 2011-05-06 03:44 EDT by Chao Yang
Modified: 2011-07-27 14:01 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-27 14:01:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Chao Yang 2011-05-06 03:44:39 EDT
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.