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 1540181 - Libvirt: disallow virtio-gpu to boot with vIOMMU
Summary: Libvirt: disallow virtio-gpu to boot with vIOMMU
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Fangge Jin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-30 12:41 UTC by Peter Xu
Modified: 2018-01-31 08:04 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1531543
: 1540182 (view as bug list)
Environment:
Last Closed: 2018-01-31 07:55:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Peter Krempa 2018-01-30 13:24:28 UTC
The qemu BZ describes it as a bug in qemu which may eventually be properly fixed, so this is only a workaround.

If it's so I don't think we want to fix this in libvirt. This creates problems once qemu manages to fix it since it's usually hard to detect when such configuration is valid now.

In such case, qemu should reject it until fixed. Or we need a strong guarantee that qemu will add a witness which will be enabled once the bug is fixed so we can lift this restriction.

Given that this is a corner case, I think we should be fine with qemu refusing to start.

Comment 3 Peter Xu 2018-01-31 03:08:55 UTC
(In reply to Peter Krempa from comment #2)
> The qemu BZ describes it as a bug in qemu which may eventually be properly
> fixed, so this is only a workaround.
> 
> If it's so I don't think we want to fix this in libvirt. This creates
> problems once qemu manages to fix it since it's usually hard to detect when
> such configuration is valid now.
> 
> In such case, qemu should reject it until fixed. Or we need a strong
> guarantee that qemu will add a witness which will be enabled once the bug is
> fixed so we can lift this restriction.
> 
> Given that this is a corner case, I think we should be fine with qemu
> refusing to start.

It's okay to me, but for both video and libvirt I'm not familiar enough to say a solid word.  Gerd, would you help confirm?

Thanks,
PeterX

Comment 4 Gerd Hoffmann 2018-01-31 07:29:36 UTC
> It's okay to me, but for both video and libvirt I'm not familiar enough to
> say a solid word.  Gerd, would you help confirm?

Throw an error in realize should be easy, and given that there is no easy for libvirt to detect whenever a device supports iommu or not failing with a clear message in the logs (which I think will also be shown by "virt start") is a reasonable approach to the issue.

I guess only pci devices (not virtio-mmio) can have a iommu attached, correct?  Then we need a check for both virtio-gpu-pci and virtio-vga devices.  Do you want come up with a patch?  If not I can give it a try, but I need some hints how a pci device can figure whenever it has a iommu attached to it or not.

Comment 5 Peter Xu 2018-01-31 07:50:58 UTC
(In reply to Gerd Hoffmann from comment #4)
> > It's okay to me, but for both video and libvirt I'm not familiar enough to
> > say a solid word.  Gerd, would you help confirm?
> 
> Throw an error in realize should be easy, and given that there is no easy
> for libvirt to detect whenever a device supports iommu or not failing with a
> clear message in the logs (which I think will also be shown by "virt start")
> is a reasonable approach to the issue.
> 
> I guess only pci devices (not virtio-mmio) can have a iommu attached,
> correct?  Then we need a check for both virtio-gpu-pci and virtio-vga
> devices.  Do you want come up with a patch?  If not I can give it a try, but
> I need some hints how a pci device can figure whenever it has a iommu
> attached to it or not.

Yeah, I posted one already for upstream QEMU (with you CCed).  Please have a look:

  [PATCH] virtio-gpu: disallow vIOMMU

Regarding to the virtio-mmio question - I am not sure about it.  IIUC that's used mostly in ARM, and I'm not sure whether ARM can declare a MMIO device under vIOMMU/vSMMU protection.  My above patch only fixes virtio-gpu-pci and virtio-vga. 

Then I'm fine to close current bug, and we can continue the discussion upstream, or in the other QEMU bug tracker.

Thanks,
Peter


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