qemu/include/hw/virtio
Gerd Hoffmann 9b7621bca2 virtio-gpu: track and limit host memory allocations
This patch makes virtio-gpu track host memory allocations for ressources
and applies a limit (configurable 256M by default).  When exceeding the
limit virtio-gpu throws VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY errors (like
it already does today when pixman image allocations fail).

This patch covers 2d mode only.  For 3d mode we have to figure how we
are going to handle this best.  qemu doesn't track resources in case
virglrenderer is used, so I guess we should extend virglrenderer to
allow setting a limit, then let qemu set the limit and catch
virgl_renderer_resource_create failures.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: 李强 <liqiang6-s@360.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1480423356-22255-1-git-send-email-kraxel@redhat.com
2016-12-20 14:19:08 +01:00
..
vhost-backend.h vhost-vsock: add virtio sockets device 2016-09-10 00:28:08 +03:00
vhost-scsi.h vhost-scsi: include linux/vhost.h 2015-09-25 12:04:41 +02:00
vhost-vsock.h vhost-vsock: add virtio sockets device 2016-09-10 00:28:08 +03:00
vhost.h vhost: drop legacy vring layout bits 2016-11-15 17:20:38 +02:00
virtio-access.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-balloon.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-blk.h virtio-blk: make some functions static 2016-10-10 01:16:58 +03:00
virtio-bus.h virtio: introduce grab/release_ioeventfd to fix vhost 2016-11-18 17:29:25 +02:00
virtio-crypto.h virtio-crypto: using bh to handle dataq's requests 2016-11-01 19:21:08 +02:00
virtio-gpu.h virtio-gpu: track and limit host memory allocations 2016-12-20 14:19:08 +01:00
virtio-input.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-net.h virtio-net: allow increasing rx queue size 2016-09-27 17:54:21 +08:00
virtio-rng.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
virtio-scsi.h virtio: set ISR on dataplane notifications 2016-11-18 17:29:25 +02:00
virtio-serial.h virtio-serial: enable virtio console emergency write feature 2016-10-10 01:16:57 +03:00
virtio.h virtio: set ISR on dataplane notifications 2016-11-18 17:29:25 +02:00