Bug 1922093 - Should fail to define guest xml with non-virtio video devices using packed virtqueues
Summary: Should fail to define guest xml with non-virtio video devices using packed vi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.5
Assignee: khanicov
QA Contact: zhentang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-29 08:49 UTC by Lili Zhu
Modified: 2021-11-16 08:09 UTC (History)
8 users (show)

Fixed In Version: libvirt-7.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 07:51:32 UTC
Type: Bug
Target Upstream Version: 7.2.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4684 0 None None None 2021-11-16 07:51:58 UTC

Description Lili Zhu 2021-01-29 08:49:49 UTC
Description of problem:
Should fail to define guest xml with non-virtio video devices using packed virtqueues

Version-Release number of selected component (if applicable):
qemu-kvm-5.2.0-3.module+el8.4.0+9499+42e58f08.x86_64
libvirt-7.0.0-2.module+el8.4.0+9520+ef609c5f.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare a guest xml with video devices using packed virtqueues
# cat guest.xml
... 
 <video>
      <driver packed='on'/>
      <model type='vga' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </video>
...

2. define guest xml
# virsh define guest.xml 
Domain 'avocado-vt-vm1' defined from guest.xml

3. start the guest 
# virsh start avocado-vt-vm1 
error: Failed to start domain 'avocado-vt-vm1'
error: internal error: qemu unexpectedly closed the monitor: 2021-01-29T08:25:40.353439Z qemu-kvm: -device VGA,id=video0,vgamem_mb=16,bus=pci.8,addr=0x0,packed=on: Property 'VGA.packed' not found


Expected results:
As only virtio devices support packed virtqueues, it's better to fail to define or edit xml with non-virtio video devices using packed virtqueues

Comment 1 khanicov 2021-03-10 17:07:04 UTC
Patches proposed on the list:
https://listman.redhat.com/archives/libvir-list/2021-March/msg00458.html

Comment 2 khanicov 2021-03-19 12:56:07 UTC
Merged upstream as:

b5d25b8183 domain_validate: Move virDomainCheckVirtioOptionsAreAbsent() a few lines forward
v7.1.0-250-gb5d25b8183

25d3b41e5e domain_validate: XML validate that non-virtio video devices have none virtio options
v7.1.0-251-g25d3b41e5e

Comment 5 zhentang 2021-06-08 06:50:06 UTC
VERIFIED
==========================
Environment:
Compiled against library: libvirt 7.4.0
Using library: libvirt 7.4.0
Using API: QEMU 7.4.0
Running hypervisor: QEMU 5.2.0

xml data:
...

<video>
      <driver packed='on'/>
      <model type='vga' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x01' function='0x0'/>
    </video>
...
Result:
# virsh define tztest_bug.xml 
error: Failed to define domain from tztest_bug.xml
error: unsupported configuration: packed driver option is only supported for virtio devices

Comment 7 errata-xmlrpc 2021-11-16 07:51: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 (virt:av bug fix and enhancement update), 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-2021:4684


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