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 1195176 - [RFE] add virtio-gpu and virtio-vga support
Summary: [RFE] add virtio-gpu and virtio-vga support
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: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1295907
Blocks: 1288337 1326589
TreeView+ depends on / blocked
 
Reported: 2015-02-23 10:33 UTC by Gerd Hoffmann
Modified: 2016-11-03 18:13 UTC (History)
18 users (show)

Fixed In Version: libvirt-1.3.3-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1295907 1326589 (view as bug list)
Environment:
Last Closed: 2016-11-03 18:13:21 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 Gerd Hoffmann 2015-02-23 10:33:45 UTC
Description of problem:

qemu will get support for a family of virtio-based display devices.
libvirt should support these devices.

Opening this bug as early heads-up, will add comments in merge process.

Comment 1 Gerd Hoffmann 2015-02-23 10:35:14 UTC
Patch series posted upstream as RfC:
https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg04342.html

Comment 4 Gerd Hoffmann 2015-03-25 15:27:05 UTC
Qemu patches will probably be merged upstream for 2.4,
so more a 7.3 than a 7.2 target, updated flags.

Guest update: submitted driver for review.

Comment 5 Gerd Hoffmann 2015-06-12 07:57:59 UTC
Partly (virtio-gpu-device) merged upstream now.

Remaining bits (virtio-gpu-pci, virtio-vga) are expected to be merged for 2.4 too.

Comment 6 Gerd Hoffmann 2015-06-12 07:58:53 UTC
Oh, and btw: The guest driver (linux kernel) is in -next and will probably merged in 4.2

Comment 7 Gerd Hoffmann 2015-06-17 14:31:55 UTC
> Remaining bits (virtio-gpu-pci, virtio-vga) are expected to be merged for
> 2.4 too.

Landed in qemu master branch now.

Comment 8 Marc-Andre Lureau 2015-11-24 13:09:04 UTC
sent a rfc series: https://www.redhat.com/archives/libvir-list/2015-November/msg00844.html

Comment 9 Michal Privoznik 2015-11-27 15:53:28 UTC
Patches pushed upstream:

commit 06198b9c73ff07d70560c4d72f3d73f00e1ef9fa
Author:     Marc-André Lureau <marcandre.lureau>
AuthorDate: Wed Nov 25 09:42:33 2015 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Fri Nov 27 16:48:53 2015 +0100

    qemu: add virtio-gpu virgl support
    
    Check if virtio-gpu provides virgl option, and add qemu command line
    formatter.
    
    It is enabled with the existing accel3d attribute:
    <model type='virtio' heads='1'>
     <acceleration accel3d='yes'/>
    </model>
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau>
    Signed-off-by: Michal Privoznik <mprivozn>

commit 21373feb4eeb1d447ccbc9a10d28f3927f650c09
Author:     Marc-André Lureau <marcandre.lureau>
AuthorDate: Wed Nov 25 09:42:32 2015 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Fri Nov 27 16:48:53 2015 +0100

    qemu: add virtio video device
    
    qemu 2.5 provides virtio video device.  It can be used with -device
    virtio-vga for primary devices, or -device virtio-gpu for non-vga
    devices. However, only the primary device (VGA) is supported with this
    patch.
    
    Reference:
    https://bugzilla.redhat.com/show_bug.cgi?id=1195176
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau>
    Signed-off-by: Michal Privoznik <mprivozn>

commit 806ae4993320804b82a6ec1da5237625cc081ad6
Author:     Marc-André Lureau <marcandre.lureau>
AuthorDate: Wed Nov 25 09:42:31 2015 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Fri Nov 27 16:48:53 2015 +0100

    domain: replace bool accel{2d, 3d} with a tristate
    
    Allowing to have the extra undefined/default state.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau>
    Signed-off-by: Michal Privoznik <mprivozn>

commit 56a4fe2818beffee0b32e88d61aab39c23a90c24
Author:     Marc-André Lureau <marcandre.lureau>
AuthorDate: Wed Nov 25 09:42:30 2015 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Fri Nov 27 16:48:53 2015 +0100

    Replace support{2d,3d} with accel{2d,3d}
    
    Following the domain XML naming
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau>


v1.2.21-168-g06198b9

Comment 10 Ademar Reis 2016-01-05 19:07:17 UTC
Gerd made the following comment in a recent conversation:

"live migration with 3d/virgl is *alot* harder than live migration with
2d only.  live migration with 3d enabled will probably not be supported
for that reason, so user will have to pick between 3d support and live
migration support.

That is one possible reason why users might want turn off 3d support and
why we need a switch for libvirt to enable/disable 3d support in
libvirt."

What's the current status in libvirt? Can I switch live-migration on/off and 3d accell on/off simultaneously, or will 3d imply live-migration=off?

Comment 11 Michal Privoznik 2016-01-06 15:28:05 UTC
(In reply to Ademar Reis from comment #10)
> Gerd made the following comment in a recent conversation:
> 
> "live migration with 3d/virgl is *alot* harder than live migration with
> 2d only.  live migration with 3d enabled will probably not be supported
> for that reason, so user will have to pick between 3d support and live
> migration support.
> 
> That is one possible reason why users might want turn off 3d support and
> why we need a switch for libvirt to enable/disable 3d support in
> libvirt."
> 
> What's the current status in libvirt? Can I switch live-migration on/off and
> 3d accell on/off simultaneously, or will 3d imply live-migration=off?

There's no API to switch from 2d to 3d at domain runtime. The only possibility is to supply different domain XML on migration where 3d would be disabled. But I see two problems with that: 1) I'm not sure how qemu will cope with that - it's possibly guest ABI breakage. 2) there's no way how to enable 3d once domain is migrated and started on the dst. So I guess it's that of 3d is on, live migration is off. Although since this is a hypervisor implementation limitation I am not sure if libvirt should workaround this somehow.

Comment 12 Ján Tomko 2016-01-06 15:48:10 UTC
There is no switch to enable/disable migration in libvirt, although it does check for some unsupported features (like non-USB hostdevs or the invtsc CPU flag) and refuses to migrate if they are present.

I would prefer not including checks for features which are not implemented yet, especially if libvirt can't reliably probe if QEMU supports them or not upfront.

Comment 13 Mike McCune 2016-03-28 22:50:27 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 15 Niccolò Belli 2016-04-11 15:57:32 UTC
Is virt-manager support planned?

Comment 16 Michal Privoznik 2016-04-13 07:36:02 UTC
(In reply to Niccolò Belli from comment #15)
> Is virt-manager support planned?

It should be. But to make sure we will not miss that I'm cloning this bug over to virt-manager.

Comment 17 zhe peng 2016-07-27 10:13:35 UTC
Verify with build:
libvirt-2.0.0-3.el7.x86_64
qemu-kvm-rhev-2.6.0-14.el7.x86_64

step:
1: define a guest with virtio-gpu
.......
<video>
      <model type='virtio' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
.......
2: start the guest
check qemu cmd line:
.........
-device virtio-vga,id=video0,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4
.......
3: destroy the guest,add another video to guest and start
.....
 <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
.....
check qemu cmd line:
........
-device virtio-vga,id=video0,bus=pci.0,addr=0x2
-device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x8

........
4: destroy the guest, edit primary to qxl video and save 
error: unsupported configuration: non-primary video device must be type of 'qxl'

for spice opengl support:
test with xml:
.....
 <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <gl enable='yes'/>
    </graphics>
.....
    <video>
      <model type='virtio' heads='1' primary='yes'>
        <acceleration accel3d='yes'/>
      </model>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
.....
# virsh start rhel7
error: Failed to start domain rhel7
error: unsupported configuration: This QEMU doesn't support spice OpenGL

Comment 18 zhe peng 2016-09-05 02:25:43 UTC
per comment 17, move to verified.

Comment 19 Niccolò Belli 2016-09-05 11:14:16 UTC
If you want spice gl you can't listen to an address, you have to use a socket instead: https://bugzilla.redhat.com/show_bug.cgi?id=1337290

Comment 21 errata-xmlrpc 2016-11-03 18:13:21 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.