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 1260749 - RFE: support QXL vram64 parameter
Summary: RFE: support QXL vram64 parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1260751
TreeView+ depends on / blocked
 
Reported: 2015-09-07 15:24 UTC by David Jaša
Modified: 2016-11-03 18:23 UTC (History)
11 users (show)

Fixed In Version: libvirt-1.3.3-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:23:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description David Jaša 2015-09-07 15:24:46 UTC
Description of problem:
qxl device allows setting of:
  * BAR #0 size (ram)
    * it's subregion for framebuffer (vgamem)
  * 32b BAR #1 size (vram)
  * 64b BAR #1 size (vram64)
libvirt can only configure first three but the last one will be needed to properly support high resolutions.

Note: the whole point of this parameter is to be able to scale the device memory past hundreds of megabytes and the qemu parameter takes also megabytes so PLEASE, don't use kilobytes for this value...


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

Comment 1 Pavel Hrdina 2016-03-01 13:28:39 UTC
Upstream commit:

commit b4a5fd95f70b373601abcecdb9d87e4cdb219350
Author: Pavel Hrdina <phrdina>
Date:   Tue Feb 23 17:04:19 2016 +0100

    qemu: introduce vram64 attribute for QXL video device

Comment 2 Pavel Hrdina 2016-03-01 13:32:44 UTC
One more comment about this statement "PLEASE, don't use kilobytes for this value".  This is our representation in XML.  The size in kibibytes is converted to mebibytes for qemu and everything works correctly.

Comment 3 Mike McCune 2016-03-28 23:17:33 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 yafu 2016-04-12 06:16:26 UTC
Hi,Pavel, I test the patch with libvirt-1.3.3-1.el7.x86_64 , find 'virsh dumpxm' did not show the vram64 setting and the screen resolution still is 2k in linux guest. Would you please help to check that? Thanks a lot.

My test steps:
1.Edit guest with vram64 setting:
  #virsh edit rhel7.2
  ...
   <video>
   <model type='qxl' vram64='131072' heads='1'/>
  </video>
  ...

2.Start the guest:
  #virsh start rhel7.2

3.Dump guest xml and not show vram64 setting in the guest xml:
  #virsh dumpxml rhel7.2 | grep -A5 video
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>         ------not show vram64 setting
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

4.Login in the guest and check the qxl device and can see the 64b bar:
  #dmesg | grep -i qxl
  [    1.222614] [drm] qxl: 16M of VRAM memory size
[    1.222614] [drm] qxl: 63M of IO pages memory ready (VRAM domain)
[    1.222615] [drm] qxl: 128M of Surface memory size
[    1.227247] fbcon: qxldrmfb (fb0) is primary device
[    1.240532] qxl 0000:00:02.0: fb0: qxldrmfb frame buffer device
[    1.240533] qxl 0000:00:02.0: registered panic notifier
[    1.240537] [drm] Initialized qxl 0.1.0 20120117 for 0000:00:02.0 on minor 0

5.Test with windows2012 guest, the screen resolution can be changed to 2560X1600;

6.Test with linux guest, the screen resolution still only is 2k.

Comment 6 Pavel Hrdina 2016-04-13 08:21:48 UTC
Hi Yan,

Oh, the missing vram64 in XML is a bug, I've just fixed it and send a patch to upstream.  Next rebase will include this patch also for RHEL.

The second part that the linux guest can set only 2k resolution isn't a libvirt issue, since as you've verified, the guest can see that the QXL device has that memory available.

The only bug in libvirt is that we drop the vram64 from live XML.

Upstream patch posted:
https://www.redhat.com/archives/libvir-list/2016-April/msg00670.html

Comment 7 yafu 2016-05-23 08:37:28 UTC
Hi,Pavel, I test the patch with libvirt-1.3.4-1.el7.x86_64, libvirt still drop the vram64 from live XML.

Comment 8 Pavel Hrdina 2016-06-01 12:51:16 UTC
Hi Yen,

I forget to push it after it was acked.  It's pushed now and it will be included in the next rebase.

Comment 9 yafu 2016-06-17 07:14:25 UTC
Hi,Pavel,I test the bug with libvirt-1.3.5-1.el7.x86_64, and find when set vram64 to value more than '1024*2048', the value displayed in the guest is not correct.

steps:
1.Set vram64 to '1024*4096':
   ...
     <model type='qxl' ram='65536' vram='65536' vram64='4194304' vgamem='16384' heads='1' primary='yes'/>
   ...

2.Start the guest:
  #virsh start rhel7.3

3.Check the vram64 value in the qemu cmds:
  #ps aux | grep -i vram64
  ...vram64_size_mb=4096...

4.Login in the guest and check the qxl device and can see the 64b bar:
  ...
[    4.369750] [drm] qxl: 16M of VRAM memory size
[    4.369751] [drm] qxl: 63M of IO pages memory ready (VRAM domain)
***[    4.369752] [drm] qxl: 64M of Surface memory size***
[    4.371639] fbcon: qxldrmfb (fb0) is primary device
[    4.395866] qxl 0000:00:0a.0: fb0: qxldrmfb frame buffer device
[    4.395867] qxl 0000:00:0a.0: registered panic notifier
[    4.395873] [drm] Initialized qxl 0.1.0 20120117 for 0000:00:0a.0 on minor 0

Comment 10 Pavel Hrdina 2016-06-17 08:36:12 UTC
Hi Yan,

If you check qemu command line using "ps ax | grep qemu" you would see that libvirt correctly passes the vram64 argument in MiB to qemu.  This is either qemu or qxl bug.

Comment 11 yafu 2016-08-22 10:27:17 UTC
Verified pass with libvirt-2.0.0-5.el7.x86_64.

Test steps:
1.Edit guest with vram64 setting:
  #virsh edit rhel7.2
  ...
   <video>
   <model type='qxl' vram64='131072' heads='1'/>
  </video>
  ...

2.Start the guest:
  #virsh start rhel7.2

3.Dump guest xml and not show vram64 setting in the guest xml:
  #virsh dumpxml rhel7.2 | grep -A5 video
    <video>
      <model type='qxl' ram='65536' vram='65536' ***vram64='131072'*** vgamem='16384' heads='1' primary='yes'/>         
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

4.Check the qemu cmd:
#ps aux | grep -i vram64
...vram64_size_mb=128,...


5.Login in the guest and check the qxl device and can see the 64b bar:
  #dmesg | grep -i qxl
[    3.079634] [drm] qxl: 16M of VRAM memory size
[    3.079635] [drm] qxl:63M of IO pages memory ready (VRAM domain)
***[    3.079636] [drm] qxl: 128M of Surface memory size***

6.Set invalid value in the domain xml(<0,>2^32-1,non integer chars):
#virsh edit rhel7.3
...
 <video>
      <model type='qxl' ram='65536' vram='65536' vram64='4294967296' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video

save the xml, failed to validate:
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,?]: 

7.Do migration with vram64 setting:
#virsh migrate rhel7.3 qemu+ssh://10.66.144.8/system --live --verbose
 Migration: [100 %]

8.Do some operations after step6 ,guest works well.

Comment 13 errata-xmlrpc 2016-11-03 18:23:35 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://rhn.redhat.com/errata/RHSA-2016-2577.html


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