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 2024435 - ramfb='off' translate to wrong qemu option
Summary: ramfb='off' translate to wrong qemu option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: x86_64
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: zhentang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-18 05:24 UTC by Guo, Zhiyi
Modified: 2022-05-17 13:05 UTC (History)
8 users (show)

Fixed In Version: libvirt-7.10.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 12:45:52 UTC
Type: Bug
Target Upstream Version: 7.10.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-103112 0 None None None 2021-11-18 05:25:59 UTC
Red Hat Product Errata RHBA-2022:2390 0 None None None 2022-05-17 12:46:20 UTC

Description Guo, Zhiyi 2021-11-18 05:24:58 UTC
Description of problem:
ramfb='off' translate to wrong qemu option

Version-Release number of selected component (if applicable):
libvirt-7.9.0-1.el9.x86_64
qemu-kvm-6.1.0-6.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Try to boot a intel vGPU VM with libvirt xml:
...
    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on' ramfb='off'>
      <source>
        <address uuid='0328361c-ec35-4eb0-940f-0782bc5a1aa4'/>
      </source>
      <alias name='ua-0328361c-ec35-4eb0-940f-0782bc5a1aa4'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>
...
2.
3.

Actual results:
Fail to boot VM and libvirt report error:
# virsh start rhel85_i915-GVTg_V5_4
error: Failed to start domain 'rhel85_i915-GVTg_V5_4'
error: internal error: qemu unexpectedly closed the monitor: 2021-11-18T05:22:32.739586Z qemu-kvm: -device vfio-pci,id=ua-0328361c-ec35-4eb0-940f-0782bc5a1aa4,sysfsdev=/sys/bus/mdev/devices/0328361c-ec35-4eb0-940f-0782bc5a1aa4,display=on,ramfb=off,bus=pci.7,addr=0x0: Property 'vfio-pci.ramfb' not found


Expected results:
vGPU VM can boot normally

Additional info:
This is a regression of libvirt-7.9.0-1.el9.x86_64, no such issue happen on libvirt-7.6.0-6.module+el8.5.0+13051+7ddbe958.x86_64

Comment 1 Peter Krempa 2021-11-18 08:14:36 UTC
Prior to the refactor which caused the above problem to pop-up the 'ramfb' property was added only if it was set to enabled.

Comment 2 Peter Krempa 2021-11-18 08:58:41 UTC
Patches posted for review:

https://listman.redhat.com/archives/libvir-list/2021-November/msg00487.html

Comment 3 Peter Krempa 2021-11-19 13:01:30 UTC
Fixed upstream by:

commit 84d1347dbe09743eec6d7b05c130923407c5e20f
Author: Peter Krempa <pkrempa>
Date:   Thu Nov 18 09:25:29 2021 +0100

    qemuxml2argvtest: Add device with 'ramfb=off' to 'hostdev-mdev-display-ramfb'
    
    Add a test case where 'ramfb' is explicitly disabled for a mediated
    device to prevent regressing again.
    
    Signed-off-by: Peter Krempa <pkrempa>
    Reviewed-by: Ján Tomko <jtomko>

commit c3bf7f5e620c6fe839df96e763b9aac2b110a369
Author: Peter Krempa <pkrempa>
Date:   Thu Nov 18 09:23:09 2021 +0100

    qemuBuildHostdevMediatedDevProps: Format 'ramfb' only when enabled
    
    Before commit 73c352ab8c97d3 which converted the hostdev commandline
    formatter to JSON the 'ramfb' property was formatted only if it was
    enabled.
    
    The main reason for that is that enabling 'ramfb' switches the device
    model to 'vfio-pci-nohotplug' which actually has the property, while
    'vfio-pci' (used when 'ramfb' is disabled or absent) doesn't have it.
    
    Restore the logic to format 'ramfb' only when it's enabled and add a
    comment that it's deliberate.
    
    Fixes: 73c352ab8c97d3
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024435
    Signed-off-by: Peter Krempa <pkrempa>
    Reviewed-by: Ján Tomko <jtomko>

v7.9.0-186-g84d1347dbe

Comment 6 zhentang 2021-11-26 09:50:22 UTC
tested on the latest version: libvirt v7.10.0-rc1-2-gd120fc5253
It works well.

Comment 9 zhentang 2021-12-31 06:59:52 UTC
verified on 
libvirt-7.10.0-1.el9
qemu-kvm-6.2.0-1.el9

vGPU VM can boot normally as expected

# virsh start rhel8 
Domain 'rhel8' started

# virsh dumpxml rhel8
...
 <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on' ramfb='off'>
      <source>
        <address uuid='8d08839c-e1ca-4b0a-b7b8-983f7876e18e'/>
      </source>
      <alias name='ua-0328361c-ec35-4eb0-940f-0782bc5a1aa4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </hostdev>
...

Comment 11 errata-xmlrpc 2022-05-17 12:45:52 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 (new packages: libvirt), 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-2022:2390


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