Bug 1549587

Summary: [NetKVM] Add support in virtio-net Windows driver for VIRTIO_F_IOMMU_PLATFORM virtio feature
Product: Red Hat Enterprise Linux 7 Reporter: Yvugenfi <yvugenfi>
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: ddepaula, lijin, mtessun, vrozenfe, wyu, ybendito, yvugenfi
Version: 7.6Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Windows   
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:50 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:
Bug Depends On:    
Bug Blocks: 1549577, 1558351    

Description Yvugenfi@redhat.com 2018-02-27 13:21:48 UTC
Description of problem:
virtio-win drivers are not reporting VIRTIO_F_IOMMU_PLATFORM feature.

There are several things that should be done to fix it:

1. Ensure that Windows drivers are using Windows kernel DMA (easier for storage and network drivers that are already using framework specific APIs, additional work should be done for WDF based drivers).

2. Report the feature.

Additional BZs will be opened for each of the drivers.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Yvugenfi@redhat.com 2018-03-19 16:21:04 UTC
Please test on Windows 10 and Windows Server 2016.

To test virtio-net device add:

-device intel-iommu,intremap=on,caching-mode=on,eim=on,device-iotlb=on 
-device virtio-net-pci,netdev=hostnet2,...,iommu_platform=on,ats=on,disable-legacy=on,disable-modern=off \

With the old driver, the installation will fail. With the new driver, it will succeed.

Comment 3 Yu Wang 2018-04-17 09:07:33 UTC
With build 149, cannot install driver successfully, code10
With build 150, can install driver successfully ,can get valid ip and ping out.

version:
kernel-3.10.0-871.el7.x86_64
qemu-kvm-rhev-2.10.0-21.el7.x86_64
virtio-win-prewhql-150

boot command line:

/usr/libexec/qemu-kvm -M pc,kernel-irqchip=split -name acceptance -enable-kvm -m 2G -smp 2 -uuid 2fd41914-5019-4d17-a6cc-fa688ba516f5 -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot order=cd,menu=on -object iothread,id=thread0 -drive file=win10-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,serial=mike_cao,cache=none -device virtio-blk-pci,iothread=thread0,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/home/whql_autotest/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-0,id=ide0-1-0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -vnc 0.0.0.0:1 -vga std -qmp tcp:0:4448,server,nowait -monitor stdio -cdrom /home/virtio-win-prewhql-0.1-150.iso -device virtio-net-pci,mac=9a:86:87:88:89:8a,id=idRB0WNk,vectors=4,netdev=idb3O1YX,disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on -netdev tap,id=idb3O1YX,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhostforce

Comment 4 Yu Wang 2018-04-17 09:10:24 UTC
Hi Yan,

Are "installing driver successfully" and "getting valid ip and ping out." enough ?
Do we have other method to check this feature?

Thanks
Yu Wang

Comment 5 Yvugenfi@redhat.com 2018-04-17 09:17:04 UTC
(In reply to Yu Wang from comment #4)
> Hi Yan,
> 
> Are "installing driver successfully" and "getting valid ip and ping out."
> enough ?
> Do we have other method to check this feature?
> 
> Thanks
> Yu Wang

Yes, it is enough. Thanks a lot!

Comment 6 Yu Wang 2018-04-17 09:26:08 UTC
According to comment#3 and comment#5 , change status to verified

Comment 7 lijin 2018-04-17 09:56:15 UTC
(In reply to Yan Vugenfirer from comment #2)
> Please test on Windows 10 and Windows Server 2016.

Does this means iommu is only enabled on windows 10 and windows 2016 only?
If yes, is there any reason for it?

Comment 8 Yvugenfi@redhat.com 2018-04-17 10:54:50 UTC
(In reply to lijin from comment #7)
> (In reply to Yan Vugenfirer from comment #2)
> > Please test on Windows 10 and Windows Server 2016.
> 
> Does this means iommu is only enabled on windows 10 and windows 2016 only?
> If yes, is there any reason for it?

The reason is the availability of OS support. Even in Windows 10 we cannot be 100% sure if Windows chooses to use IOMMU or not.

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

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

Li Jin, do you know who can provide that ack? I can't build an official 
package without it.

Comment 11 Danilo de Paula 2018-08-21 14:41:42 UTC
Martin, can you provide pm_ack+, please?

Thanks

Comment 13 errata-xmlrpc 2018-10-30 16:21:50 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

Comment 14 Yu Wang 2018-11-23 09:42:20 UTC
Hi Yan,

I have a question about this bug:
Can our windows driver (including netkvm/viostor) "truely" support iommu function? Or this driver only can be installed successfully with "iommu_platform=on"

Thanks
Yu Wang