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