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 1457610 - libvirt should give a nicer error message when intremap='split' in iommu device
Summary: libvirt should give a nicer error message when intremap='split' in iommu device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Jingjing Shao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-01 02:55 UTC by Jingjing Shao
Modified: 2018-04-10 10:48 UTC (History)
5 users (show)

Fixed In Version: libvirt-3.8.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:46:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0704 0 None None None 2018-04-10 10:48:00 UTC

Description Jingjing Shao 2017-06-01 02:55:23 UTC
Description of problem:
libvirt should give a nicer error message when intremap='split'  in iommu device

Version-Release number of selected component (if applicable):
libvirt-3.2.0-6.el7

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest and add the xml as below without add " <ioapic driver='qemu'/> "
    <iommu model='intel'>
      <driver intremap='on'/>
    </iommu>

2.Start the guest and get the error

# virsh start q35-js
error: Failed to start domain q35-js
error: internal error: qemu unexpectedly closed the monitor: 2017-05-26T06:23:33.798217Z qemu-kvm: -chardev pty,id=charserial0: char device redirected to /dev/pts/1 (label charserial0)
2017-05-26T06:23:33.857340Z qemu-kvm: -device intel-iommu,intremap=on: Intel Interrupt Remapping cannot work with kernel-irqchip=on, please use 'split|off'.

3.change the attribute intremap='split' but also get error
 <iommu model='intel'>
    <driver intremap='split'/>
 </iommu>

# virsh edit q35-js
error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
Failed. Try again? [y,n,i,f,?]: 
error: XML error: unknown intremap value: split


Actual results:
intremap='split' is not supported, but libvirt gives a confusing error info in step2

Expected results:
libvirt should give a nicer error message when 'intremap='split' or libvirt should support 'intremap='split'

Additional info:
N/A

Comment 2 Ján Tomko 2017-08-29 16:48:42 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2017-August/msg00919.html

Comment 3 Ján Tomko 2017-09-11 13:11:13 UTC
Pushed upstream as:
commit 90cd99a42e1afabc57f70a0e1e17e27f986ae04f
Author:     Ján Tomko <jtomko>
CommitDate: 2017-09-11 14:56:07 +0200

    conf: validate IOMMU interrupt remapping setting
    
    This option requires:
      <ioapic driver='qemu'/>
    
    Report an error in case someone tries to combine
    it with different ioapic setting.
    
    Setting 'eim' on without enabling 'intremap' does not make sense.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1457610

git describe: v3.7.0-40-g90cd99a42

Comment 5 Jingjing Shao 2017-11-02 12:17:35 UTC
Hi Ján,

With libvirt-3.8.0-1.el7.x86_64, I found something wrong when I add the xml as below to guest no matter add  <ioapic driver='qemu'/>  or not.

<iommu model='intel'>
  <driver intremap='on' caching='on'/>
</iommu>


# virsh edit q35-js
error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content



But with xml as below , the output are as expected.

<iommu model='intel'>
  <driver intremap='on'/>
</iommu>

and
  
<iommu model='intel'>
  <driver intremap='on' eim='on'/>
</iommu>are as expected.



(1) with <ioapic driver='qemu'/> ,  the xml as below can be edit and start successfully.


(2) Without  <ioapic driver='qemu'/>, the guest will output as below

# virsh edit q35-js
error: XML error: IOMMU interrupt remapping requires split I/O APIC (ioapic driver='qemu')
Failed. Try again? [y,n,i,f,?]:

Comment 6 Ján Tomko 2017-11-02 12:23:07 UTC
The attribute name is 'caching_mode'

Comment 7 Jingjing Shao 2017-11-02 12:57:16 UTC
Thanks‘s Ján' reply so soon and so sorry that I made a mistake.

Add the xml as below to guest xml.
<iommu model='intel'>
  <driver intremap='on' caching_mode='on'/>
</iommu>

 
(1) with <ioapic driver='qemu'/> ,  the  guest can be edit and start successfully.

(2) without <ioapic driver='qemu'/>, the guest get the output as below.

# virsh edit q35-js
error: XML error: IOMMU interrupt remapping requires split I/O APIC (ioapic driver='qemu')
Failed. Try again? [y,n,i,f,?]: 


So with the comment 5 and comment 7, I change the status to verified

Comment 11 errata-xmlrpc 2018-04-10 10:46:43 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/RHEA-2018:0704


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