Browse Source

hw/vfio: Compile iommufd.c once

Removing unused "exec/ram_addr.h" header allow to compile
iommufd.c once for all targets.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20250308230917.18907-6-philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20250311085743.21724-8-philmd@linaro.org
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Philippe Mathieu-Daudé 5 months ago
parent
commit
d5c0be1a94
2 changed files with 3 additions and 4 deletions
  1. 0 1
      hw/vfio/iommufd.c
  2. 3 3
      hw/vfio/meson.build

+ 0 - 1
hw/vfio/iommufd.c

@@ -25,7 +25,6 @@
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/chardev_open.h"
 #include "qemu/chardev_open.h"
 #include "pci.h"
 #include "pci.h"
-#include "exec/ram_addr.h"
 
 
 static int iommufd_cdev_map(const VFIOContainerBase *bcontainer, hwaddr iova,
 static int iommufd_cdev_map(const VFIOContainerBase *bcontainer, hwaddr iova,
                             ram_addr_t size, void *vaddr, bool readonly)
                             ram_addr_t size, void *vaddr, bool readonly)

+ 3 - 3
hw/vfio/meson.build

@@ -4,9 +4,6 @@ vfio_ss.add(files(
   'container.c',
   'container.c',
 ))
 ))
 vfio_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr.c'))
 vfio_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr.c'))
-vfio_ss.add(when: 'CONFIG_IOMMUFD', if_true: files(
-  'iommufd.c',
-))
 vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files(
 vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files(
   'display.c',
   'display.c',
   'pci-quirks.c',
   'pci-quirks.c',
@@ -28,3 +25,6 @@ system_ss.add(when: 'CONFIG_VFIO', if_true: files(
   'migration-multifd.c',
   'migration-multifd.c',
   'cpr.c',
   'cpr.c',
 ))
 ))
+system_ss.add(when: ['CONFIG_VFIO', 'CONFIG_IOMMUFD'], if_true: files(
+  'iommufd.c',
+))