Bug 1449712

Summary: [RFE] Support max_outputs option for virtio video
Product: Red Hat Enterprise Linux 7 Reporter: Fangge Jin <fjin>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED ERRATA QA Contact: Fangge Jin <fjin>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: dyuan, lmiksik, rbalakri, xuzhang, zpeng
Target Milestone: rcKeywords: FutureFeature, Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-3.7.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 10:43:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fangge Jin 2017-05-10 13:36:16 UTC
Description of problem:
Qemu-kvm-rhev supports max_outputs option for virtio video,but libvirt doesn't support.


Version-Release number of selected component:
libvirt-3.2.0-4.el7.x86_64
qemu-kvm-rhev-2.9.0-3.el7.x86_64


How reproducible:
100%


Steps to Reproduce:
1. Prepare a guest with video element as below:
# virsh dumpxml rhel7.4
...
    <video>
      <model type='virtio' heads='4' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

2. Start guest:
# virsh start rhel7.4

3. Check qemu command line:
# ps aux|grep virtio-vga
-device virtio-vga,id=video0,bus=pci.0,addr=0x2


Actual results:
As step3, no max_outputs in qemu command line


Expected results:
In step3, there should be max_outputs in qemu command line:
-device virtio-vga,max_outputs=4,id=video0,bus=pci.0,addr=0x2


Additional info:
Qemu-kvm-rhev supports max_outputs:
# /usr/libexec/qemu-kvm -device virtio-vga,max_outputs=3
VNC server running on ::1:5900

Comment 1 Martin Kletzander 2017-08-23 12:16:10 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2017-August/msg00640.html

Comment 2 Martin Kletzander 2017-08-29 09:21:03 UTC
Fixed upstream with v3.6.0-225-g66c4e1533505..v3.6.0-226-gfb61407501ee:
commit 66c4e153350507526ddefdb968b98fa453e0f390
Author: Martin Kletzander <mkletzan>
Date:   Wed Aug 23 14:06:17 2017 +0200

    qemu: Add capabilities for virtio-vga/gpu's max_outputs= parameter
    
commit fb61407501ee6c1f3a8774762df2f4bdadfeddd4
Author: Martin Kletzander <mkletzan>
Date:   Wed Aug 23 14:06:41 2017 +0200

    qemu: Add support for virtio-vga/gpu's max_outputs= parameter

Comment 4 Fangge Jin 2017-10-23 02:31:15 UTC
Verify pass with libvirt-3.8.0-1.el7.x86_64

Steps:
1. Start a guest with max_outputs configuration for virtio video:
# virsh dumpxml vm2|grep head -a2
...
    <video>
      <model type='virtio' heads='3' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='virtio' heads='1'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
    </video>
    <video>
      <model type='virtio' heads='4'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </video>
...

2. Check qemu command line:
# ps aux|grep max_outputs
...
-device virtio-vga,id=video0,max_outputs=3,bus=pci.0,addr=0x2 
-device virtio-gpu-pci,id=video1,max_outputs=1,bus=pci.0,addr=0xd 
-device virtio-gpu-pci,id=video2,max_outputs=4,bus=pci.0,addr=0xb
...

Comment 8 errata-xmlrpc 2018-04-10 10:43:32 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