[virt-tools-list] [virt-manager] [PATCH 6/7] cli: Add 'blob' to virtio video device
Lin Ma
lma at suse.de
Tue Jul 11 00:26:51 UTC 2023
Libvirt enables blob resources for the virtio video device since 9.2.0.
It accelerates the display path due to less or no copying of pixel data.
E.g.
virt-install \
... \
--video model.type=virtio,blob=on
It results in the following domain xml:
<video>
<model type="virtio" blob="on"/>
</video>
Signed-off-by: Lin Ma <lma at suse.de>
---
tests/data/cli/compare/virt-install-many-devices.xml | 5 +++++
tests/test_cli.py | 1 +
virtinst/cli.py | 2 ++
virtinst/devices/video.py | 1 +
4 files changed, 9 insertions(+)
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index 1c95c4fb..77e916f2 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -767,6 +767,11 @@
<acceleration accel3d="yes"/>
</model>
</video>
+ <video>
+ <model type="virtio" blob="on">
+ <acceleration accel3d="yes"/>
+ </model>
+ </video>
<hostdev mode="subsystem" type="pci" managed="yes">
<source>
<address domain="0" bus="0" slot="25" function="0"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 7fee4d0e..eb3fad51 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -734,6 +734,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
--video cirrus
--video model=qxl,vgamem=1,ram=2,vram=3,heads=4,accel3d=yes,vram64=65
--video model=qxl,model.vgamem=1,model.ram=2,model.vram=3,model.heads=4,model.acceleration.accel3d=yes,model.vram64=65
+--video model=virtio,blob=on
--smartcard passthrough,type=spicevmc
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 694b9255..3d554ee7 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -4605,6 +4605,7 @@ class ParserVideo(VirtCLIParser):
"model.vram64": "vram64",
"model.vgamem": "vgamem",
"model.acceleration.accel3d": "accel3d",
+ "model.blob": "blob",
}
@classmethod
@@ -4619,6 +4620,7 @@ class ParserVideo(VirtCLIParser):
cls.add_arg("model.vram", "vram")
cls.add_arg("model.vram64", "vram64")
cls.add_arg("model.vgamem", "vgamem")
+ cls.add_arg("model.blob", "blob")
###################
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
index 70067a72..1b5489c0 100644
--- a/virtinst/devices/video.py
+++ b/virtinst/devices/video.py
@@ -19,6 +19,7 @@ class DeviceVideo(Device):
heads = XMLProperty("./model/@heads", is_int=True)
vgamem = XMLProperty("./model/@vgamem", is_int=True)
accel3d = XMLProperty("./model/acceleration/@accel3d", is_yesno=True)
+ blob = XMLProperty("./model/@blob", is_onoff=True)
##################
--
2.41.0
More information about the virt-tools-list
mailing list