Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1580096

Summary: NetKVM: Interrupt vectors to CPU mapping fix
Product: Red Hat Enterprise Linux 7 Reporter: Sameeh Jubran <sjubran>
Component: virtio-winAssignee: Sameeh Jubran <sjubran>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ddepaula, juzhang, lijin, michen, phou, sjubran, vrozenfe, wyu, xiagao
Version: 7.6   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
NO_DOCS
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 16:21:51 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 Sameeh Jubran 2018-05-20 02:08:56 UTC
Description of problem:

In MSI interrupts we can bind interrupt vectors to specific CPUs, a bug ws discovered in the binding function and it was fixed in the following PR:

https://github.com/virtio-win/kvm-guest-drivers-windows/pull/283
https://github.com/virtio-win/kvm-guest-drivers-windows/pull/284

Background, we receive a list of descriptors from Windows which contains various configurations including interrupt mappings which we should set. This list is not consecutive, so we might encounter some number of interrupt descriptors in the list and then some other descriptors and eventually some more interrupt descriptors. The function SetupInterrruptAffinity, had a calculation bug which would cause the mapping to occur not in the way it was intended.

In order to test that this fixes the issue, I have added a debug print, it should appear when the driver is loaded it should print the following where #CPU should have the same #CPU number for each two following prints:

DPrintf(0, "[%s]: Assigning CmResourceTypeInterrupt, min/max = %lx/%lx Option = 0x%lx, ShareDisposition = %u to #CPU = %d\n", __FUNCTION__, desc->u.Interrupt.MinimumVector, desc->u.Interrupt.MaximumVector, desc->Option, desc->ShareDisposition, procNumber.Number);

So in order to test it, run build 152 (hopefully should have these commits), enable tracing and check the debug print above.

Comment 2 Yu Wang 2018-05-29 06:27:18 UTC
Hi Sameeh Jubran,

Could you tell me how to get following prints?

DPrintf(0, "[%s]: Assigning CmResourceTypeInterrupt, min/max = %lx/%lx Option = 0x%lx, ShareDisposition = %u to #CPU = %d\n", __FUNCTION__, desc->u.Interrupt.MinimumVector, desc->u.Interrupt.MaximumVector, desc->Option, desc->ShareDisposition, procNumber.Number);

It seems that I cannot get output by dbgview now and cannot find related info by WPP TraceView, which tools or method we can get the output?

Thanks
Yu Wang

Comment 3 Sameeh Jubran 2018-05-29 07:21:16 UTC
(In reply to Yu Wang from comment #2)
> Hi Sameeh Jubran,
> 
> Could you tell me how to get following prints?
> 
> DPrintf(0, "[%s]: Assigning CmResourceTypeInterrupt, min/max = %lx/%lx
> Option = 0x%lx, ShareDisposition = %u to #CPU = %d\n", __FUNCTION__,
> desc->u.Interrupt.MinimumVector, desc->u.Interrupt.MaximumVector,
> desc->Option, desc->ShareDisposition, procNumber.Number);
> 
> It seems that I cannot get output by dbgview now and cannot find related
> info by WPP TraceView, which tools or method we can get the output?
> 
> Thanks
> Yu Wang

How did you configure the command line of qemu? Did you configure multiqueue?? The message should show up upon the init phase of the driver and can be triggered by disabling and enabling the driver.

Comment 4 Yu Wang 2018-05-29 08:33:16 UTC
(In reply to Sameeh Jubran from comment #3)
> 
> How did you configure the command line of qemu? Did you configure
> multiqueue?? The message should show up upon the init phase of the driver
> and can be triggered by disabling and enabling the driver.

Yes, boot with mq:

-smp 2 \
-netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on,queues=2 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:3b:35:88:00,mq=on,vectors=6

Where can I get the message? dbgview ? Trace view? or other tools?

Comment 5 Yu Wang 2018-05-29 09:58:42 UTC
Hi Sameeh Jubran,

Seems that dprintf is not enabled, WPP is enabled. So we cannot get dprintf log as comment#0, could you help to check it?

Thanks
Yu Wang

Comment 6 Sameeh Jubran 2018-06-12 09:47:44 UTC
(In reply to Yu Wang from comment #5)
> Hi Sameeh Jubran,
> 
> Seems that dprintf is not enabled, WPP is enabled. So we cannot get dprintf
> log as comment#0, could you help to check it?
> 
> Thanks
> Yu Wang

WPP should be enabled in the new build (154), please check it out :)

Comment 10 lijin 2018-07-05 02:32:38 UTC
Hi Vadim,

I only see one commit in the build 156(still on the way), patches for this bz are not included.

commit fa3237cbdad628e91934043272151f598f5d77d9
Author: Yan Vugenfirer <yvugenfi>
Date:   Tue Jul 3 15:56:06 2018 +0300

    NetKVM: BZ#1577708: Fix E2EPerf WHQL test failure
    
    Set the MAX link speed to 10G.
    
    Signed-off-by: Yan Vugenfirer <yvugenfi>


Do you plan to make them into another new build 157?

Comment 12 Sameeh Jubran 2018-07-05 12:27:51 UTC
I can actually find the print traces on my setup, I haven't tried this build but if the patches are in, there is no reason for this not showing up. Here is a sample output:

00000071	netkvm.sys	4	3632	3	71	07\05\2018-10:27:04:940	 SetupInterrruptAffinity[SetupInterrruptAffinity]: Assigning CmResourceTypeInterrupt, min/max = fffffffe/fffffffe Option = 0x0, ShareDisposition = 1 to #CPU = 0
00000072	netkvm.sys	4	3632	3	72	07\05\2018-10:27:04:940	 SetupInterrruptAffinity[SetupInterrruptAffinity]: Assigning CmResourceTypeInterrupt, min/max = fffffffe/fffffffe Option = 0x0, ShareDisposition = 1 to #CPU = 0

Comment 13 Yu Wang 2018-07-09 03:50:58 UTC
Verified this bug with build 156

It report message " SetupInterrruptAffinity[SetupInterrruptAffinity]: Assigning CmResourceTypeInterrupt, min/max = fffffffe/fffffffe Option = 0x0, ShareDisposition = 1 to #CPU = 0", the same as comment#12

Above all, this bug has been fix, and change status to verified.

Thanks all
Yu Wang

Comment 14 Danilo de Paula 2018-08-21 14:11:31 UTC
Can we have QA, PM and Release flags for this, please?

Comment 16 errata-xmlrpc 2018-10-30 16:21:51 UTC
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.

https://access.redhat.com/errata/RHBA-2018:3413