Bug 590884 - bogus 'info pci' state when hot-added assigned device fails to initialize
Summary: bogus 'info pci' state when hot-added assigned device fails to initialize
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
: 579981 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-10 21:07 UTC by Alex Williamson
Modified: 2010-11-11 19:30 UTC (History)
3 users (show)

Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-04 09:05:52 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Alex Williamson 2010-05-10 21:07:21 UTC
Description of problem:

For a pci device hot added via pci_add in the monitor, if the device assignment initfn function errors (such as from trying to assign a device with shared interrupts), the pci state shown via 'info pci' in the monitor contains a bogus entry for the device.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Try to hot pci_add a device that uses shared interrupts
Actual results:
'info pci' shows a garbage entry

Expected results:
no residual garbage

Additional info:

Comment 2 RHEL Program Management 2010-05-10 22:51:03 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 3 Alex Williamson 2010-05-11 03:15:13 UTC
Patch posted upstream:

Comment 9 Qunfang Zhang 2010-06-04 09:05:32 UTC
Can reproduce on qemu-kvm- and verified on qemu-kvm-, passed.

0.Unbind the pci device (for example a NIC card) from host.
1.Boot a guest without pci device assigned.
 /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=rver-5.5-64-virtio.qcow2,if=none,id=drive-ide0-0-0 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -boot order=dc,menu=on -uuid 17644ecc-d3a1-4d3c-a386-12daf50015f2 -rtc base=utc -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -cpu qemu64,+sse2 -balloon none -vnc :10
2.modprobe acpiphp (in guest)
3.(qemu)info pci
(qemu)pci_add pci_addr=auto host host=03:02.0
4.(qemu)info pci

In the old version(qemu-kvm-
1.After step 4, there is a garbage entry
 Bus  0, device   4, function 1:
    Class 0000: PCI device 0040:0000
      BAR0: 32 bit prefetchable memory at 0xffffffffffffffff [0x0000041f].
      BAR1: 32 bit memory at 0x00000000 [0x020002af].
      BAR2: 32 bit prefetchable memory at 0x02000210 [0x0400047f].
      BAR3: 32 bit memory at 0x000003b1 [0x02000530].
      BAR4: 32 bit memory at 0x02000320 [0x7f63e807f1f7].
      BAR6: I/O at 0x2005000 [0x400517f].
      id "���c"

While in the fixed version, no entry generated when input "info pci" in monitor.

So, I will close this bug.

Comment 10 Amit Shah 2010-06-23 06:51:34 UTC
*** Bug 579981 has been marked as a duplicate of this bug. ***

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