yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-s390x-fix-build-for-without-default-devices.patch

8fced6
From d86158eeb752242791e3f94172ed020204040250 Mon Sep 17 00:00:00 2001
8fced6
From: Cornelia Huck <cohuck@redhat.com>
8fced6
Date: Tue, 19 Jan 2021 12:50:46 -0500
8fced6
Subject: [PATCH 7/7] s390x: fix build for --without-default-devices
8fced6
MIME-Version: 1.0
8fced6
Content-Type: text/plain; charset=UTF-8
8fced6
Content-Transfer-Encoding: 8bit
8fced6
8fced6
RH-Author: Cornelia Huck <cohuck@redhat.com>
8fced6
Message-id: <20210119125046.472811-8-cohuck@redhat.com>
8fced6
Patchwork-id: 100681
8fced6
O-Subject: [RHEL-8.4.0 qemu-kvm PATCH 7/7] s390x: fix build for --without-default-devices
8fced6
Bugzilla: 1905391
8fced6
RH-Acked-by: David Hildenbrand <david@redhat.com>
8fced6
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
8fced6
RH-Acked-by: Thomas Huth <thuth@redhat.com>
8fced6
8fced6
s390-pci-vfio.c calls into the vfio code, so we need it to be
8fced6
built conditionally on vfio (which implies CONFIG_LINUX).
8fced6
8fced6
Fixes: cd7498d07fbb ("s390x/pci: Add routine to get the vfio dma available count")
8fced6
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8fced6
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8fced6
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8fced6
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
8fced6
Message-Id: <20201103123237.718242-1-cohuck@redhat.com>
8fced6
Acked-by: Greg Kurz <groug@kaod.org>
8fced6
Tested-by: Greg Kurz <groug@kaod.org>
8fced6
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
8fced6
(cherry picked from commit 77280d33bc9cfdbfb5b5d462259d644f5aefe9b3)
8fced6
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
8fced6
8fced6
 Conflicts:
8fced6
	hw/s390x/meson.build
8fced6
        include/hw/s390x/s390-pci-vfio.h
8fced6
        --> adaptions due to missing Meson rework
8fced6
8fced6
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
8fced6
---
8fced6
 hw/s390x/Makefile.objs           | 2 +-
8fced6
 include/hw/s390x/s390-pci-vfio.h | 3 ++-
8fced6
 2 files changed, 3 insertions(+), 2 deletions(-)
8fced6
8fced6
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
8fced6
index 43756c9437d..dbef4b8906c 100644
8fced6
--- a/hw/s390x/Makefile.objs
8fced6
+++ b/hw/s390x/Makefile.objs
8fced6
@@ -7,7 +7,7 @@ obj-y += ipl.o
8fced6
 obj-y += css.o
8fced6
 obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o
8fced6
 obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o
8fced6
-obj-$(CONFIG_LINUX) += s390-pci-vfio.o
8fced6
+obj-$(CONFIG_VFIO) += s390-pci-vfio.o
8fced6
 ifeq ($(CONFIG_VIRTIO_CCW),y)
8fced6
 obj-y += virtio-ccw.o
8fced6
 obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
8fced6
diff --git a/include/hw/s390x/s390-pci-vfio.h b/include/hw/s390x/s390-pci-vfio.h
8fced6
index 539bcf04eb5..685b136d46b 100644
8fced6
--- a/include/hw/s390x/s390-pci-vfio.h
8fced6
+++ b/include/hw/s390x/s390-pci-vfio.h
8fced6
@@ -13,8 +13,9 @@
8fced6
 #define HW_S390_PCI_VFIO_H
8fced6
 
8fced6
 #include "hw/s390x/s390-pci-bus.h"
8fced6
+#include "config-devices.h"
8fced6
 
8fced6
-#ifdef CONFIG_LINUX
8fced6
+#ifdef CONFIG_VFIO
8fced6
 bool s390_pci_update_dma_avail(int fd, unsigned int *avail);
8fced6
 S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
8fced6
                                           S390PCIBusDevice *pbdev);
8fced6
-- 
8fced6
2.27.0
8fced6