libvirt/src/qemu
Laszlo Ersek 706b5b6277 qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64)
Most of QEMU's PCI display device models, such as:

  libvirt video/model/@type  QEMU -device
  -------------------------  ------------
  cirrus                     cirrus-vga
  vga                        VGA
  qxl                        qxl-vga
  virtio                     virtio-vga

come with a linear framebuffer (sometimes called "VGA compatibility
framebuffer"). This linear framebuffer lives in one of the PCI device's
MMIO BARs, and allows guest code (primarily: firmware drivers, and
non-accelerated OS drivers) to display graphics with direct memory access.

Due to architectural reasons on aarch64/KVM hosts, this kind of
framebuffer doesn't / can't work in

  qemu-system-(arm|aarch64) -M virt

machines. Cache coherency issues guarantee a corrupted / unusable display.
The problem has been researched by several people, including kvm-arm
maintainers, and it's been decided that the best way (practically the only
way) to have boot time graphics for such guests is to consolidate on
QEMU's "virtio-gpu-pci" device.

>From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt
supports

  <devices>
    <video>
      <model type='virtio'/>
    </video>
  </devices>

but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga"
device model. (See the qemuBuildDeviceVideoStr() function and the
"qemuDeviceVideo" enum impl.)

According to the above, this is not right for the "virt" machine type; the
qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga"
device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure
virtio device without a compatibility framebuffer, is available, and works
fine.

(The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware
for "virt" -- supports "virtio-gpu-pci", as of upstream commit
3ef3209d3028. See
<https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.)

Override the default mapping of "virtio", from "virtio-vga" to
"virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true.

Cc: Andrea Bolognani <abologna@redhat.com>
Cc: Drew Jones <drjones@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Martin Kletzander <mkletzan@redhat.com>
Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Martin Kletzander <mkletzan@redhat.com>
2016-09-16 14:13:07 +02:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug conf: Introduce chartcp_tls_x509_cert_dir 2016-09-09 08:09:03 -04:00
MIGRATION.txt
qemu_agent.c qemu: guest agent: introduce new error code VIR_ERR_AGENT_UNSYNCED 2016-09-07 12:35:18 +03:00
qemu_agent.h qemu: agent: Make setting of vcpus more robust 2016-06-22 09:26:08 +02:00
qemu_alias.c qemu: Add support for TLS X.509 path to TCP chardev backend 2016-09-09 08:09:47 -04:00
qemu_alias.h qemu: Add support for TLS X.509 path to TCP chardev backend 2016-09-09 08:09:47 -04:00
qemu_blockjob.c
qemu_blockjob.h
qemu_capabilities.c qemu_capabilities: Introduce virtio-net-*.rx_queue_size 2016-09-09 16:16:59 +02:00
qemu_capabilities.h qemu_capabilities: Introduce virtio-net-*.rx_queue_size 2016-09-09 16:16:59 +02:00
qemu_capspriv.h qemu: Add tests for virQEMUCapsNewCopy 2016-08-05 10:06:01 +02:00
qemu_cgroup.c numa: Rename virNumaGetHostNodeset and make it return only nodes with memory 2016-09-14 08:41:41 +02:00
qemu_cgroup.h qemu: Add missing 'p' to qemuCgrouEmulatorAllNodesRestore 2016-09-13 12:24:02 +02:00
qemu_command.c qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64) 2016-09-16 14:13:07 +02:00
qemu_command.h qemu: avoid parameter named 'listen' 2016-09-12 15:49:28 +01:00
qemu_conf.c qemu: fix improper initialization of cgroupControllers bitmap 2016-09-12 14:40:22 -04:00
qemu_conf.h conf: Introduce chartcp_tls_x509_cert_dir 2016-09-09 08:09:03 -04:00
qemu_domain_address.c conf: Fix initialization value of 'multi' in PCI address 2016-09-02 16:43:00 +02:00
qemu_domain_address.h Add qemuDomainCCWAddrSetCreateFromDomain 2016-07-26 13:04:46 +02:00
qemu_domain.c qemu: domain: Don't infer vcpu state 2016-09-14 12:56:57 +02:00
qemu_domain.h qemu: Don't use query-migrate on destination 2016-09-12 15:56:10 +02:00
qemu_driver.c virDomainGetBlockJobInfo: Fix corner case when qemu reports no info 2016-09-14 12:44:42 +02:00
qemu_driver.h
qemu_hostdev.c Use virDirOpenQuiet 2016-06-24 14:20:57 +02:00
qemu_hostdev.h
qemu_hotplug.c qemu: hotplug: Don't wait if cdrom tray is opened forcibly 2016-09-12 09:54:36 +02:00
qemu_hotplug.h qemu: hotplug: Add support for VCPU unplug 2016-08-24 15:44:47 -04:00
qemu_hotplugpriv.h
qemu_interface.c qemu: set tap device online for type='ethernet' 2016-08-25 18:54:01 -04:00
qemu_interface.h
qemu_migration.c qemu: Don't use query-migrate on destination 2016-09-12 15:56:10 +02:00
qemu_migration.h qemu: Implement auto convergence migration parameters 2016-06-22 15:54:21 +02:00
qemu_monitor_json.c qemu: Add the ability to hotplug the TLS X.509 environment 2016-09-09 08:09:47 -04:00
qemu_monitor_json.h qemu: monitor: Add support for calling query-hotpluggable-cpus 2016-08-24 15:44:47 -04:00
qemu_monitor_text.c qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs 2016-08-24 15:44:47 -04:00
qemu_monitor_text.h qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs 2016-08-24 15:44:47 -04:00
qemu_monitor.c qemu: monitor: Add vcpu state information to monitor data 2016-09-14 12:55:33 +02:00
qemu_monitor.h qemu: monitor: Add vcpu state information to monitor data 2016-09-14 12:55:33 +02:00
qemu_parse_command.c util: storage: Add 'ssh' network storage protocol 2016-07-27 13:24:20 +02:00
qemu_parse_command.h
qemu_process.c qemu: Add missing 'p' to qemuCgrouEmulatorAllNodesRestore 2016-09-13 12:24:02 +02:00
qemu_process.h qemu: Use proper async job to refresh virtio channels 2016-06-30 09:41:39 +02:00
qemu_processpriv.h
qemu.conf conf: Introduce chartcp_tls_x509_cert_dir 2016-09-09 08:09:03 -04:00
test_libvirtd_qemu.aug.in conf: Introduce chartcp_tls_x509_cert_dir 2016-09-09 08:09:03 -04:00
THREADS.txt