Bug 979988
Summary: | The error message should be improved in some pci assignment scenario with VFIO driver | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xuesong Zhang <xuzhang> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | acathrow, dallan, dyuan, honzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-27 10:42:24 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xuesong Zhang
2013-07-01 09:28:57 UTC
The error messages in steps 3 and 7 say that QEMU started but crashed afterwards. I'm not sure if it's feasible to provide more info from the QEMU error output in such case. This falls into the general category of libvirt needing to scrape the qemu log for error messages. Isn't there a BZ about that somewhere? I think Cole filed it... The problem with libvirt detecting the failure condition (that there are devices in the same group that haven't been bound to vfio-pci or pci-stub) is that it encodes the same rules into libvirt that are already in the kernel, so 1) the same logic is in two places, and 2) if that logic changes in the kernel, then libvirt may still prevent some operations that the kernel actually allows (for example if the kernel gets a switch to loosen restrictions on grouped devices). (Here is the current logic in the kernel: it requires all other devices in the same group to be bound to vfio-pci, pci-stub, or pcieport, and to be either assigned to the same guest, or to no guest at all). Add the following message for your reference. Keep other steps same as the description, only change the libvirt command in step 3 and 7 to qemu command, the error message in qemu is clearly for reference. Below is the command and error message in qemu: /usr/libexec/qemu-kvm -name kvm-rhel7.0-x86_64-qcow2-virtio -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 668424dc-b029-48f2-8947-ab9c1dca2a1e -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/kvm-rhel7.0-x86_64-qcow2-virtio.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/kvm-rhel6.4-x86_64-qcow2.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -device vfio-pci,host=03:00.0 char device redirected to /dev/pts/1 (label charserial0) qemu-kvm: -device vfio-pci,host=03:00.0: vfio: error opening /dev/vfio/14: No such file or directory qemu-kvm: -device vfio-pci,host=03:00.0: vfio: failed to get group 14 qemu-kvm: -device vfio-pci,host=03:00.0: Device initialization failed. qemu-kvm: -device vfio-pci,host=03:00.0: Device 'vfio-pci' could not be initialized I had forgotten about this BZ when I filed Bug 1001738. Since Peter has already been working on the BZ, I'll mark this one as a duplicate. *** This bug has been marked as a duplicate of bug 1001738 *** |