cryptospore / rpms / qemu-kvm

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