Bug 723535
Summary: | pci-stub driver is lost after an attempt to boot a VM with a PCI device assigned to other VM | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Eduard Benes <ebenes> |
Component: | libvirt | Assignee: | Osier Yang <jyang> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.1 | CC: | ajia, chayang, dallan, ddutile, dyuan, iboverma, juzhang, mkenneth, mvadkert, mzhan, rwu, sgrubb, smueller, tburke, veillard, virt-maint, yupzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.9.4-2.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 11:17:10 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 584498, 846801, 846802 |
Description
Eduard Benes
2011-07-20 13:51:52 UTC
Why do you think this is a bug we should fix? It is exactly like running a new VM that uses the virtual disk of the first and be surprised things break. Finally got the required HW, and here are the requested results for 82576. Tested on fresh RHEL 6.1 with no additional updates. Summary: It does not work with 82576, igb driver. Please, let me know if you need more info. [root@hp-dl180g6-01 iommu]# lspci -s 0000:07:00.1 07:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) [root@hp-dl180g6-01 iommu]# virsh create guest1.xml Domain guest1 created from guest1.xml [root@hp-dl180g6-01 iommu]# pgrep qemu-kvm 11728 [root@hp-dl180g6-01 iommu]# guest1=11728 [root@hp-dl180g6-01 iommu]# readlink /sys/bus/pci/devices/0000:07:00.1/driver ../../../../bus/pci/drivers/pci-stub [root@hp-dl180g6-01 iommu]# grep -e fbee0000 -e fbec0000 -e fbebc000 /proc/$guest1/maps 7f8268bee000-7f8268bf2000 rw-s fbebc000 00:00 7054 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource3 7f8268bf2000-7f8268c12000 rw-s fbec0000 00:00 7052 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource1 7f8268c12000-7f8268c32000 rw-s fbee0000 00:00 7051 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource0 [root@hp-dl180g6-01 iommu]# virsh create guest2.xml error: Failed to create domain from guest2.xml error: internal error Not detaching active device 0000:07:00.1 [root@hp-dl180g6-01 iommu]# pgrep qemu-kvm 11728 [root@hp-dl180g6-01 iommu]# grep -e fbee0000 -e fbec0000 -e fbebc000 /proc/$guest1/maps 7f8268bee000-7f8268bf2000 rw-s fbebc000 00:00 7054 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource3 7f8268bf2000-7f8268c12000 rw-s fbec0000 00:00 7052 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource1 7f8268c12000-7f8268c32000 rw-s fbee0000 00:00 7051 /sys/devices/pci0000:00/0000:00:01.0/0000:07:00.1/resource0 [root@hp-dl180g6-01 iommu]# readlink /sys/bus/pci/devices/0000:07:00.1/driver [root@hp-dl180g6-01 iommu]# [root@hp-dl180g6-01 iommu]# ls /sys/bus/pci/devices/0000:07:00.1/driver ls: cannot access /sys/bus/pci/devices/0000:07:00.1/driver: No such file or directory Concerning comment 2: For the CC eval, I think we do not need to have the issue fixed. However, I consider this issue a usability issue that is en par with the partition mapping problem we reported a few months ago. An administrator is allowed to make mistakes. And when the system clearly knows that there is a mistake, the system should ensure that already running VMs are not affected by the error. Hence, I suggest you fix that issue. Note, I have not looked into the problem closely, but if that issue is located in the pci-stub driver, a rogue VM may trigger that problem too and not only libvirtd. Accordind to comment 8,after step4, booted second guest with same device don't affect first vm and device. this issue should be libvirt issue. Per comment8 and comment3, change component to libvirt.if need kvm qe further testing,please let us now. Cann't reproduce this bug with libvirt-0.9.4-2.el6 and qemu-kvm-0.12.1.2-2.177.el6. Will try it with the old version soon. Get some different result from the bug description. 1. The error report is "reattaching" when start the test2. # virsh start test2 error: Failed to start domain test2 error: internal error Not **reattaching** active device 0000:03:00.0 2. After start test2 failed, we can read the pci-stub. # readlink /sys/bus/pci/devices/0000\:03\:00.0/driver ../../../../bus/pci/drivers/pci-stub 3. The pci device is working well in test1. Reproduced this bug with libvirt-0.8.7-18.el6 and qemu-kvm-0.12.1.2-2.177.el6. Get the same error report and issue with the bug description. Similar bug 603039 which was verified recently. commit 53a1db4dfcae87ee42e8f7bbf5f746f0547da9ae Author: Chris Lalancette <clalance> Date: Mon Jun 14 17:12:35 2010 -0400 Check for active PCI devices when doing nodedevice operations. In the current libvirt PCI code, there is no checking whether a PCI device is in use by a guest when doing node device detach or reattach. This causes problems when a device is assigned to a guest, and the administrator starts issuing nodedevice commands. Make it so that we check the list of active devices when trying to detach/reattach, and only allow the operation if the device is not assigned to a guest. Signed-off-by: Chris Lalancette <clalance> Libvirt fixed this one year before. The patch prevent both attaching and nodedev-attach/detach when the device is in use by a guest. Move this to POST. Based in comment #11 and following, this is fixed in current builds, flagging as such, Daniel I also confirm that I cannot reproduce the problem with the packages below. I used for reproducing the same machine as the reporter. # rpm -q libvirt qemu-kvm kernel libvirt-0.9.4-4.el6.x86_64 qemu-kvm-0.12.1.2-2.183.el6.x86_64 kernel-2.6.32-131.6.1.el6.x86_64 When trying to lunch the second virtual machine while the first one running I get expected error: Error starting domain: internal error Process exited while reading console log output: char device redirected to /dev/pts/0 Failed to assign device "hostdev0" : Device or resource busy qemu-kvm: -device pci-assign,host=07:00.1,id=hostdev0,configfd=24,bus=pci.0,addr=0x5: Device 'pci-assign' could not be initialized After this the driver is still available for the first virtual machine: # readlink /sys/bus/pci/devices/0000\:07\:00.1/driver ../../../../bus/pci/drivers/pci-stub Move it to VERIFIED according to comment 17. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html |