Bug 1025477 - VFIO MSI affinity
VFIO MSI affinity
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Alex Williamson
Virtualization Bugs
:
: 1004373 (view as bug list)
Depends On:
Blocks: 896690 969793
  Show dependency treegraph
 
Reported: 2013-10-31 15:06 EDT by Alex Williamson
Modified: 2014-06-17 23:40 EDT (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-17.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:49:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Williamson 2013-10-31 15:06:52 EDT
Description of problem:
VFIO is missing affinity support for MSI (MSI-X is already present)

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


How reproducible:
100%

Steps to Reproduce:
1. Attempt to change IRQ affinity of a vfio-pci assigned device using MSI interrupts
2.
3.

Actual results:
interrupted vcpu unchanged

Expected results:
interrupted vcpu tracks user request

Additional info:
Comment 2 Miroslav Rezanina 2013-11-07 10:56:20 EST
Fix included in qemu-kvm-1.5.3-17.el7
Comment 4 Xu Han 2013-11-18 01:51:22 EST
Reproduce this bug with components:
qemu-kvm-1.5.3-16.el7.x86_64

Steps:
1. boot guest with vfio-pci assigned device using MSI interrupts(82579LM NIC).
/usr/libexec/qemu-kvm -nodefaults -M q35 -m 1G -cpu SandyBridge -smp 4,cores=2,threads=2,sockets=1 -monitor stdio -boot menu=on -rtc base=localtime,clock=host,driftfix=slew -qmp tcp:0:5555,server,nowait -vga qxl -drive file=/home/rhel7base.qcow2,format=qcow2,id=guest-img,if=none,werror=stop,rerror=stop -device virtio-blk-pci,scsi=off,drive=guest-img,id=os-disk -spice disable-ticketing,port=5931 \
-device vfio-pci,host=00:19.0,id=hostnet

2. get IRQ num and affinity of vfio-pci assigned device.
# cat /proc/interrupts | grep ens3
# cat /proc/irq/43/smp_affinity

3. change IRQ affinity of that device.
# echo 2 > /proc/irq/43/smp_affinity

Results:
After step1, check msi information on guest.
# lspci -vvv -s 00:03.0 | grep -i msi
	Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+

After step2
# cat /proc/interrupts | grep ens3
 43:      50821          0          0          0   PCI-MSI-edge      ens3
# cat /proc/irq/43/smp_affinity
4

After step3, interrupted vcpu unchanged.
# cat /proc/irq/43/smp_affinity
4
# cat /proc/interrupts | grep ens3
 43:      51947          0          0          0   PCI-MSI-edge      ens3


Verify this bug with component:
qemu-kvm-1.5.3-19.el7.x86_64

Same steps as above.

Results:
After step2
# cat /proc/interrupts | grep ens3
 43:      43186          0        453          0   PCI-MSI-edge      ens3
# cat /proc/irq/43/smp_affinity
1

After step3, interrupted vcpu tracks user request.
# cat /proc/irq/43/smp_affinity
2
# cat /proc/interrupts | grep ens3
 43:      44167       2881        453          0   PCI-MSI-edge      ens3


Base on these test results above, this bug has been fixed.
Comment 6 Alex Williamson 2013-12-04 11:18:53 EST
*** Bug 1004373 has been marked as a duplicate of this bug. ***
Comment 7 Ludek Smid 2014-06-13 05:49:42 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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