|
|
99cbc7 |
From f2ba296053d64df74a8414816c4ef82f79f92034 Mon Sep 17 00:00:00 2001
|
|
|
99cbc7 |
Message-Id: <f2ba296053d64df74a8414816c4ef82f79f92034@dist-git>
|
|
|
99cbc7 |
From: Farhan Ali <alifm@linux.ibm.com>
|
|
|
99cbc7 |
Date: Mon, 3 Sep 2018 09:58:50 +0200
|
|
|
99cbc7 |
Subject: [PATCH] qemu: mdev: Use vfio-pci 'display' property only with
|
|
|
99cbc7 |
vfio-pci mdevs
|
|
|
99cbc7 |
|
|
|
99cbc7 |
S390 is aware of both vfio-pci and vfio-ccw devices, so
|
|
|
99cbc7 |
on S390 the capability QEMU_CAPS_VFIO_PCI_DISPLAY will be
|
|
|
99cbc7 |
available. Add an extra check to make sure we only set the
|
|
|
99cbc7 |
display to off for vfio-pci mediated devices. Otherwise we
|
|
|
99cbc7 |
add display for vfio-ccw device and this breaks vfio-ccw
|
|
|
99cbc7 |
device qemu command line.
|
|
|
99cbc7 |
|
|
|
99cbc7 |
Fixes: d54e45b6e conf: Introduce new <hostdev> attribute 'display'
|
|
|
99cbc7 |
Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
|
|
|
99cbc7 |
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
|
|
|
99cbc7 |
Reviewed-by: Erik Skultety <eskultet@redhat.com>
|
|
|
99cbc7 |
(cherry picked from commit d6f97d1338ba9470f7c745fab317d272cde84d38)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
RHEL-7.6: https://bugzilla.redhat.com/show_bug.cgi?id=1624735
|
|
|
99cbc7 |
RHEL-8.0: https://bugzilla.redhat.com/show_bug.cgi?id=1624740
|
|
|
99cbc7 |
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
99cbc7 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
99cbc7 |
---
|
|
|
99cbc7 |
src/qemu/qemu_domain.c | 1 +
|
|
|
99cbc7 |
1 file changed, 1 insertion(+)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
|
99cbc7 |
index 508846116b..17be6e5537 100644
|
|
|
99cbc7 |
--- a/src/qemu/qemu_domain.c
|
|
|
99cbc7 |
+++ b/src/qemu/qemu_domain.c
|
|
|
99cbc7 |
@@ -6272,6 +6272,7 @@ qemuDomainHostdevDefMdevPostParse(virDomainHostdevSubsysMediatedDevPtr mdevsrc,
|
|
|
99cbc7 |
/* QEMU 2.12 added support for vfio-pci display type, we default to
|
|
|
99cbc7 |
* 'display=off' to stay safe from future changes */
|
|
|
99cbc7 |
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_PCI_DISPLAY) &&
|
|
|
99cbc7 |
+ mdevsrc->model == VIR_MDEV_MODEL_TYPE_VFIO_PCI &&
|
|
|
99cbc7 |
mdevsrc->display == VIR_TRISTATE_SWITCH_ABSENT)
|
|
|
99cbc7 |
mdevsrc->display = VIR_TRISTATE_SWITCH_OFF;
|
|
|
99cbc7 |
|
|
|
99cbc7 |
--
|
|
|
99cbc7 |
2.18.0
|
|
|
99cbc7 |
|