"vbox", "qxl" (<span class="since">since 0.8.6</span>),
"virtio" (<span class="since">since 1.3.0</span>),
"gop" (<span class="since">since 3.2.0</span>),
- "none" (<span class="since">since 4.6.0</span>, or "bochs"
- (<span class="since">since 5.6.0</span>)
- depending on the hypervisor features available.
+ "bochs" (<span class="since">since 5.6.0</span>), "ramfb"
+ (<span class="since">since 5.9.0</span>), or "none"
+ (<span class="since">since 4.6.0</span>, depending on the hypervisor
+ features available.
The purpose of the type <code>none</code> is to instruct libvirt not
to add a default video device in the guest (see the paragraph above).
This legacy behaviour can be inconvenient in cases where GPU mediated
<libvirt>
<release version="v5.9.0" date="unreleased">
<section title="New features">
+ <change>
+ <summary>
+ qemu: Introduce a new video model of type 'ramfb'
+ </summary>
+ <description>
+ Introduce a new video model type to the domain XML that supports the
+ <code>ramfb</code> standalone device in qemu.
+ </description>
+ </change>
</section>
<section title="Improvements">
</section>
<value>gop</value>
<value>none</value>
<value>bochs</value>
+ <value>ramfb</value>
</choice>
</attribute>
<group>
"gop",
"none",
"bochs",
+ "ramfb",
);
VIR_ENUM_IMPL(virDomainVideoVGAConf,
case VIR_DOMAIN_VIDEO_TYPE_VIRTIO:
case VIR_DOMAIN_VIDEO_TYPE_GOP:
case VIR_DOMAIN_VIDEO_TYPE_NONE:
+ case VIR_DOMAIN_VIDEO_TYPE_RAMFB:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
default:
return 0;
VIR_DOMAIN_VIDEO_TYPE_GOP,
VIR_DOMAIN_VIDEO_TYPE_NONE,
VIR_DOMAIN_VIDEO_TYPE_BOCHS,
+ VIR_DOMAIN_VIDEO_TYPE_RAMFB,
VIR_DOMAIN_VIDEO_TYPE_LAST
} virDomainVideoType;
"" /* don't support gop */,
"" /* 'none' doesn't make sense here */,
"bochs-display",
+ "", /* ramfb can't be used with -vga */
);
VIR_ENUM_DECL(qemuDeviceVideo);
"" /* don't support gop */,
"" /* 'none' doesn't make sense here */,
"bochs-display",
+ "ramfb",
);
VIR_ENUM_DECL(qemuDeviceVideoSecondary);
"" /* don't support gop */,
"" /* 'none' doesn't make sense here */,
"" /* no secondary device for bochs */,
+ "" /* no secondary device for ramfb */,
);
VIR_ENUM_DECL(qemuSoundCodec);
case VIR_DOMAIN_VIDEO_TYPE_QXL:
case VIR_DOMAIN_VIDEO_TYPE_VIRTIO:
case VIR_DOMAIN_VIDEO_TYPE_BOCHS:
+ case VIR_DOMAIN_VIDEO_TYPE_RAMFB:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
break;
}
case VIR_DOMAIN_VIDEO_TYPE_DEFAULT:
case VIR_DOMAIN_VIDEO_TYPE_GOP:
case VIR_DOMAIN_VIDEO_TYPE_NONE:
+ case VIR_DOMAIN_VIDEO_TYPE_RAMFB:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
return 0;
}
return -1;
}
+ /* ramfb is not a PCI device */
if (def->nvideos > 0 &&
- def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
+ def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE &&
+ def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_RAMFB) {
/* Because the PIIX3 integrated IDE/USB controllers are
* already at slot 1, when qemu looks for the first free slot
* to place the VGA controller (which is always the first
return -1;
}
+ /* ramfb is not a PCI device */
if (def->nvideos > 0 &&
- def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
+ def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE &&
+ def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_RAMFB) {
/* NB: unlike the pc machinetypes, on q35 machinetypes the
* integrated devices are at slot 0x1f, so when qemu looks for
* the first free slot for the first VGA, it will always be at
/* Video devices */
for (i = 0; i < def->nvideos; i++) {
- if (def->videos[i]->type == VIR_DOMAIN_VIDEO_TYPE_NONE)
+ if (def->videos[i]->type == VIR_DOMAIN_VIDEO_TYPE_NONE ||
+ def->videos[i]->type == VIR_DOMAIN_VIDEO_TYPE_RAMFB)
continue;
if (!virDeviceInfoPCIAddressIsWanted(&def->videos[i]->info))
video->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW)) ||
(video->type == VIR_DOMAIN_VIDEO_TYPE_BOCHS &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_BOCHS_DISPLAY))) {
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_BOCHS_DISPLAY)) ||
+ (video->type == VIR_DOMAIN_VIDEO_TYPE_RAMFB &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_RAMFB))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("this QEMU does not support '%s' video device"),
virDomainVideoTypeToString(video->type));
--- /dev/null
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-QEMUGuest1 \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-i686 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-m 1024 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
+id=drive-ide0-0-0,cache=none \
+-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+write-cache=on \
+-device ramfb,id=video0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
--- /dev/null
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none'/>
+ <source file='/var/lib/libvirt/images/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <video>
+ <model type='ramfb' />
+ </video>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS);
DO_TEST_CAPS_LATEST("video-bochs-display-device");
+ DO_TEST_CAPS_LATEST("video-ramfb-display-device");
DO_TEST("video-none-device",
QEMU_CAPS_VNC);
DO_TEST_PARSE_ERROR("video-invalid-multiple-devices", NONE);