cryptospore / rpms / qemu-kvm

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