Bug 803669

Summary: Qemu prompts some error about the msi-x entry after resume guest from S4 with VF attached
Product: Red Hat Enterprise Linux 6 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Alex Williamson <alex.williamson>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, amit.shah, areis, bsarathy, chayang, juzhang, knoel, michen, mkenneth, qiguo, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Power management features such as s3 and s4 are not supported while pass through mode of pci or usb devices. S3 will wake-up immediately and s4 might have issues like the one reported by this bug.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-04 20:45:33 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: 720669, 761491, 912287    

Description Qunfang Zhang 2012-03-15 11:52:28 UTC
Description of problem:
Boot guest with VF attached, and then suspend guest to disk. Then resume it by boot up with the same command line. There's some error in the qemu monitor:

(qemu) MSI-X entry number is zero!
assigned_dev_update_msix_mmio: No such device or address

Sometimes the error appears after finish S4 and before resume guest.

Re-test with attaching a PF instead of VF, did not hit the error after 10 times attempts.

Version-Release number of selected component (if applicable):
Host:
kernel-2.6.32-251.el6.x86_64
qemu-kvm-0.12.1.2-2.246.el6.x86_64
seabios-0.6.1.2-12.enableS3S4.v1.el6.x86_64 

How reproducible:
Sometimes but very often

Steps to Reproduce:
1. Unbind a sriov VF from host to assign to guest.
# echo "8086 10ca" > /sys/bus/pci/drivers/pci-stub/new_id
# echo 0000:03:11.4 > /sys/bus/pci/devices/0000\:03\:11.4/driver/unbind
# echo 0000:03:11.4 > /sys/bus/pci/drivers/pci-stub/bind

2.Boot guest with the VF attached.
/usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Nehalem -enable-kvm -m 4G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid 4c84db67-faf8-4498-9829-19a3d6431d9d -rtc base=localtime,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/home/rhel6.3-64-virtio-backup.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,addr=0x5 -netdev tap,vhost=on,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:42:10:66,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/tmp/qzhang-test,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -usb -device usb-tablet,id=input0 -boot c -monitor stdio  -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0  -qmp tcp:0:4445,server,nowait -vnc :10 -device pci-assign,host=03:11.5,id=hostnet  -chardev socket,id=charserial0,path=/tmp/qzhang-isa,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -device pci-assign,host=03:11.4,id=hostnet2

3.Suspend guest to disk.
#pm-hibernate

4. Resume guest with the same command line

5. Repeat step 3 and 4.

  
Actual results:
(qemu) MSI-X entry number is zero!
assigned_dev_update_msix_mmio: No such device or address
MSI-X entry number is zero!
assigned_dev_update_msix_mmio: No such device or address

(qemu) /etc/qemu-ifdown: could not launch network script

Expected results:
No error.

Additional info:
Always happening after resume, sometimes happening during suspend to disk.

Comment 2 Dor Laor 2012-03-18 11:01:06 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Power management features such as s3 and s4 are not supported while pass through mode of pci or usb devices. S3 will wake-up immediately and s4 might have issues like the one reported by this bug.

Comment 4 RHEL Program Management 2012-07-10 06:47:28 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2012-07-11 02:03:26 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 Alex Williamson 2013-03-14 14:47:26 UTC
Can this be retested with 6.4 please?  Assigned device MSI-X support was completely reworked for 6.4 and may alleviate this bug.  Thanks.

Comment 7 Qunfang Zhang 2013-03-15 07:32:05 UTC
(In reply to comment #6)
> Can this be retested with 6.4 please?  Assigned device MSI-X support was
> completely reworked for 6.4 and may alleviate this bug.  Thanks.

Hi, Alex
It's in my TODO list and I will test this bug next Monday (Mar 18th) when I get a host from some other guy's hand and then update result here.

Thanks.

Comment 8 Qunfang Zhang 2013-03-18 07:13:21 UTC
I re-test this bug with RHEL6.4 host and guest, repeat hibernate and resume loop for 20 cycles. Now the issue can not be reproduced any more.

Host package version:
kernel-2.6.32-358.2.1.el6.x86_64
qemu-kvm-0.12.1.2-2.356.el6_4.2.x86_64

CLI: The same as described in comment 0.

Comment 9 Alex Williamson 2013-04-04 20:45:33 UTC
Great, let's call it fixed.