From 2fb44bb505d5e732ca508aec477dc5ce334c4757 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Tue, 3 Nov 2020 13:32:37 +0100 Subject: [PATCH 6/6] s390x: fix build for --without-default-devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit s390-pci-vfio.c calls into the vfio code, so we need it to be built conditionally on vfio (which implies CONFIG_LINUX). Fixes: cd7498d07fbb ("s390x/pci: Add routine to get the vfio dma available count") Reported-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Matthew Rosato Message-Id: <20201103123237.718242-1-cohuck@redhat.com> Acked-by: Greg Kurz Tested-by: Greg Kurz Signed-off-by: Cornelia Huck [mr: Backport: not using meson, CONFIG_DEVICES doesn't exist] Signed-off-by: Matthew Rosato --- hw/s390x/Makefile.objs | 2 +- include/hw/s390x/s390-pci-vfio.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs index 384c75b..4364296 100644 --- a/hw/s390x/Makefile.objs +++ b/hw/s390x/Makefile.objs @@ -34,4 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o obj-y += s390-ccw.o obj-y += ap-device.o obj-y += ap-bridge.o -obj-$(CONFIG_LINUX) += s390-pci-vfio.o +obj-$(CONFIG_VFIO) += s390-pci-vfio.o diff --git a/include/hw/s390x/s390-pci-vfio.h b/include/hw/s390x/s390-pci-vfio.h index bef98a2..313cf3f 100644 --- a/include/hw/s390x/s390-pci-vfio.h +++ b/include/hw/s390x/s390-pci-vfio.h @@ -13,8 +13,9 @@ #define HW_S390_PCI_VFIO_H #include "../../../hw/s390x/s390-pci-bus.h" +#include "config-devices.h" -#ifdef CONFIG_LINUX +#ifdef CONFIG_VFIO bool s390_pci_update_dma_avail(int fd, unsigned int *avail); S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s, S390PCIBusDevice *pbdev); -- 1.8.3.1