Created attachment 1399764 [details] engine error log Description of problem: without iommu enabled usb passthrough doesn't work anymore How reproducible: 100% Steps to Reproduce: 1.Click "Add device" on VM's Host Devices tab 2. Choose usb_device from Capability drop-down list in "Add Host device" dialog Actual results: No usb device present in "Available Host Devices" Expected results: usb device present Additional info: Enabling iommu on host solves this issue. When usb passthrough was configure previously in oVirt 4.1, usb devices visible in "Host Devices" list, but not present anymore inside guest. Removing usb device from VM configuration leeds to error (see attachment).
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
I see the same issue on my setup (rhvm-4.2.2.1-0.1.el7) after removing intel_iommu from /etc/default/grub on a host with intel vt-d enabled in BIOS (so it's not CPU flag issue) and VM is pinned to host.
The (In reply to Alexandr Krivulya from comment #0) > Removing usb device from VM configuration leeds to error (see attachment). This NPE is fixed in bz 1557777
(In reply to Nisim Simsolo from comment #4) > I see the same issue on my setup (rhvm-4.2.2.1-0.1.el7) after removing > intel_iommu from /etc/default/grub on a host with intel vt-d enabled in BIOS > (so it's not CPU flag issue) and VM is pinned to host. Nisim, in that case, is it just host's USB devices that are missing or all host-devices?
In 3.6 it could have worked because we showed the devices of any host (i.e., any host could be selected in the Host-Devices#add-device dialog) [1]. But in a bit more than a year ago the front-end changed to filter those hosts according to whether or not they support device-passthrough [2]. Now, if iommu is disabled then the host reports hostdevPassthrough=false [3] and thus is being filtered. Michal, should we revert [2]? [1] https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-3.6/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/hostdev/ModelWithPinnedHost.java#L56 [2] https://gerrit.ovirt.org/#/c/72789/ [3] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/common/hostdev.py#L169
Yes please. It's a worse UX for PCI passthrough but I guess we have to choose one or the other, and ability to use one feature should have priority over a bit nicer experience with the other.
(In reply to Arik from comment #6) > (In reply to Nisim Simsolo from comment #4) > > I see the same issue on my setup (rhvm-4.2.2.1-0.1.el7) after removing > > intel_iommu from /etc/default/grub on a host with intel vt-d enabled in BIOS > > (so it's not CPU flag issue) and VM is pinned to host. > > Nisim, in that case, is it just host's USB devices that are missing or all > host-devices? it's just for host USB devices. PCI and SCSI devices are listed in add host dialog.
(In reply to Nisim Simsolo from comment #9) > it's just for host USB devices. PCI and SCSI devices are listed in add host > dialog. And what's the value of the 'Device Passthrough" property in the General tab of that host?
*** Bug 1531847 has been marked as a duplicate of this bug. ***
Verification version: rhvm-4.2.2.5-0.1.el7 vdsm-4.20.23-1.el7ev.x86_64 qemu-kvm-rhev-2.10.0-21.el7_5.1.x86_64 libvirt-client-3.9.0-14.el7_5.2.x86_64 Verification scenario: 1. disable host iommu, reboot host and verify iommu is disabled. 2. Attach USB DOK, mouse and keyboard devices to VM. 3. Run VM 4. Validate devices functionality. 5. Power off VM and remove USB devices. 6. Verify devices removed.
(In reply to Nisim Simsolo from comment #9) > > Nisim, in that case, is it just host's USB devices that are missing or all > > host-devices? > > it's just for host USB devices. PCI and SCSI devices are listed in add host > dialog. I've just upgraded from 4.1.9 to 4.2.1 and seeing this issue - cannot see any host devices (or pinned hosts). I'm trying to pass through a fibre-channel tape drive from host to VM. Works fine in 4.1.9, but since upgrading to 4.2.1, can't see any hosts or devices in the Add Host Devices dialog. Of interest, devices that were present before I upgraded still show on the Host Devices screen, even though I can't add new devices. Bug 1434686 reports that all hosts without IOMMU are filtered out. I get that for stuff like vgpu. But isn't this incorrect behavior for SCSI/FC devices?
(In reply to LJ McDonald from comment #13) > (In reply to Nisim Simsolo from comment #9) > > > Nisim, in that case, is it just host's USB devices that are missing or all > > > host-devices? > > > > it's just for host USB devices. PCI and SCSI devices are listed in add host > > dialog. > > I've just upgraded from 4.1.9 to 4.2.1 and seeing this issue - cannot see > any host devices (or pinned hosts). I'm trying to pass through a > fibre-channel tape drive from host to VM. Works fine in 4.1.9, but since > upgrading to 4.2.1, can't see any hosts or devices in the Add Host Devices > dialog. Of interest, devices that were present before I upgraded still show > on the Host Devices screen, even though I can't add new devices. Bug > 1434686 reports that all hosts without IOMMU are filtered out. I get that > for stuff like vgpu. But isn't this incorrect behavior for SCSI/FC devices? The fix for this bug was to revert the change that introduced the new behavior described in bz 1434686. So with this fix, all host-devices (not only USB devices) should be presented.
(In reply to Arik from comment #14) > The fix for this bug was to revert the change that introduced the new > behavior described in bz 1434686. So with this fix, all host-devices (not > only USB devices) should be presented. I saw that, but not sure how to do that myself. Looking at the source it's a java file "ModelWithPinnedHost.java", and the change can't be reverted through any configuration option. Is there some 4.2.X version (or patch) where this has been reverted, or are you suggesting I need to downgrade?
(In reply to LJ McDonald from comment #15) > I saw that, but not sure how to do that myself. Looking at the source it's > a java file "ModelWithPinnedHost.java", and the change can't be reverted > through any configuration option. Is there some 4.2.X version (or patch) > where this has been reverted, or are you suggesting I need to downgrade? I'm suggesting to upgrade to 4.2.2.5 that is expected to be released soon.
(In reply to Arik from comment #16) > I'm suggesting to upgrade to 4.2.2.5 that is expected to be released soon. Yup - I can confirm upgrading to ovirt-engine-4.2.2.5 fixed the issue for me. I can now see hosts and host devices in the Add Host Devices dialog, and successfully passed through my FC (SCSI) tape drive to the VM. Now if we can remove the artificial limitation which prevents hot-plugging FC (SCSI) devices and allow them to be passed through to VMs without having to have the VM down (like we do for SCSI disks), that would be great! Thank you Arik and the team for the fix!
(In reply to LJ McDonald from comment #17) > Now if we can remove the artificial limitation which prevents hot-plugging > FC (SCSI) devices and allow them to be passed through to VMs without having > to have the VM down (like we do for SCSI disks), that would be great! Please file a separate bug for this. > > Thank you Arik and the team for the fix! Sure :)
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.