Skip to content

Commit

Permalink
s390x: fix build for --without-default-devices
Browse files Browse the repository at this point in the history
s390-pci-vfio.c calls into the vfio code, so we need it to be
built conditionally on vfio (which implies CONFIG_LINUX).

Fixes: cd7498d ("s390x/pci: Add routine to get the vfio dma available count")
Reported-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Matthew Rosato <[email protected]>
Message-Id: <[email protected]>
Acked-by: Greg Kurz <[email protected]>
Tested-by: Greg Kurz <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
  • Loading branch information
cohuck committed Nov 5, 2020
1 parent 5e49e89 commit 77280d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hw/s390x/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
))
s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c'))
s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c'))
s390x_ss.add(when: 'CONFIG_LINUX', if_true: files('s390-pci-vfio.c'))
s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c'))

virtio_ss = ss.source_set()
virtio_ss.add(files('virtio-ccw.c'))
Expand Down
3 changes: 2 additions & 1 deletion include/hw/s390x/s390-pci-vfio.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
#define HW_S390_PCI_VFIO_H

#include "hw/s390x/s390-pci-bus.h"
#include CONFIG_DEVICES

#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);
Expand Down

0 comments on commit 77280d3

Please sign in to comment.