qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] Vga 20180202 patches
@ 2018-02-02  8:32 Gerd Hoffmann
  2018-02-02  8:32 ` [Qemu-devel] [PULL 1/1] virtio-gpu: disallow vIOMMU Gerd Hoffmann
  2018-02-02 18:54 ` [Qemu-devel] [PULL 0/1] Vga 20180202 patches Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2018-02-02  8:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The following changes since commit b05631954d6dfe93340d516660397e2c1a2a5dd6:

  Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (2018-01-31 15:50:29 +0000)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/vga-20180202-pull-request

for you to fetch changes up to 34e304e97576a9e17680c868c00ff524a981007b:

  virtio-gpu: disallow vIOMMU (2018-02-02 08:53:22 +0100)

----------------------------------------------------------------
virtio-gpu: disallow vIOMMU

----------------------------------------------------------------

Peter Xu (1):
  virtio-gpu: disallow vIOMMU

 hw/display/virtio-gpu-pci.c | 8 +++++++-
 hw/display/virtio-gpu.c     | 5 +++++
 2 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] virtio-gpu: disallow vIOMMU
  2018-02-02  8:32 [Qemu-devel] [PULL 0/1] Vga 20180202 patches Gerd Hoffmann
@ 2018-02-02  8:32 ` Gerd Hoffmann
  2018-02-02 18:54 ` [Qemu-devel] [PULL 0/1] Vga 20180202 patches Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2018-02-02  8:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, Gerd Hoffmann, Michael S. Tsirkin

From: Peter Xu <peterx@redhat.com>

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 <kraxel@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20180131040401.3550-1-peterx@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/virtio-gpu-pci.c | 8 +++++++-
 hw/display/virtio-gpu.c     | 5 +++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c
index ef92c4ad6f..3519dc80b1 100644
--- a/hw/display/virtio-gpu-pci.c
+++ b/hw/display/virtio-gpu-pci.c
@@ -28,10 +28,16 @@ static void virtio_gpu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
     VirtIOGPU *g = &vgpu->vdev;
     DeviceState *vdev = DEVICE(&vgpu->vdev);
     int i;
+    Error *local_error = NULL;
 
     qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
     virtio_pci_force_virtio_1(vpci_dev);
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+    object_property_set_bool(OBJECT(vdev), true, "realized", &local_error);
+
+    if (local_error) {
+        error_propagate(errp, local_error);
+        return;
+    }
 
     for (i = 0; i < g->conf.max_outputs; i++) {
         object_property_set_link(OBJECT(g->scanout[i].con),
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;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] Vga 20180202 patches
  2018-02-02  8:32 [Qemu-devel] [PULL 0/1] Vga 20180202 patches Gerd Hoffmann
  2018-02-02  8:32 ` [Qemu-devel] [PULL 1/1] virtio-gpu: disallow vIOMMU Gerd Hoffmann
@ 2018-02-02 18:54 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2018-02-02 18:54 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 2 February 2018 at 08:32, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The following changes since commit b05631954d6dfe93340d516660397e2c1a2a5dd6:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (2018-01-31 15:50:29 +0000)
>
> are available in the git repository at:
>
>   git://git.kraxel.org/qemu tags/vga-20180202-pull-request
>
> for you to fetch changes up to 34e304e97576a9e17680c868c00ff524a981007b:
>
>   virtio-gpu: disallow vIOMMU (2018-02-02 08:53:22 +0100)
>
> ----------------------------------------------------------------
> virtio-gpu: disallow vIOMMU
>
> ----------------------------------------------------------------
>
> Peter Xu (1):
>   virtio-gpu: disallow vIOMMU
>
>  hw/display/virtio-gpu-pci.c | 8 +++++++-
>  hw/display/virtio-gpu.c     | 5 +++++
>  2 files changed, 12 insertions(+), 1 deletion(-)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-02 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02  8:32 [Qemu-devel] [PULL 0/1] Vga 20180202 patches Gerd Hoffmann
2018-02-02  8:32 ` [Qemu-devel] [PULL 1/1] virtio-gpu: disallow vIOMMU Gerd Hoffmann
2018-02-02 18:54 ` [Qemu-devel] [PULL 0/1] Vga 20180202 patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).