From 34e304e97576a9e17680c868c00ff524a981007b Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Wed, 31 Jan 2018 12:04:01 +0800 Subject: virtio-gpu: disallow vIOMMU virtio-gpu has special code path that bypassed vIOMMU protection. So for now let's disable iommu_platform for the device until we fully support that (if needed). After the patch, both virtio-vga and virtio-gpu won't allow to boot with iommu_platform parameter set. CC: Gerd Hoffmann Signed-off-by: Peter Xu Message-id: 20180131040401.3550-1-peterx@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/display/virtio-gpu.c') diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 274e365713..6658f6c6a6 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1173,6 +1173,11 @@ static void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) Error *local_err = NULL; int i; + if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { + error_setg(errp, "virtio-gpu does not support vIOMMU yet"); + return; + } + if (g->conf.max_outputs > VIRTIO_GPU_MAX_SCANOUTS) { error_setg(errp, "invalid max_outputs > %d", VIRTIO_GPU_MAX_SCANOUTS); return; -- cgit v1.2.3-55-g7522