On 7/3/25 21:42, Richard Henderson wrote:
On 3/7/25 10:03, Philippe Mathieu-Daudé wrote:
Convert the compile time check on the CONFIG_IOMMUFD definition
by a runtime one by calling iommufd_builtin().
Since the file doesn't use any target-specific knowledge anymore,
move it to system_ss[] to build it once.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/s390x/kvm/kvm_s390x.h | 2 +-
hw/vfio/ap.c | 27 +++++++++++++--------------
hw/vfio/meson.build | 2 +-
3 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/target/s390x/kvm/kvm_s390x.h b/target/s390x/kvm/kvm_s390x.h
index 649dae5948a..7b1cce3e60d 100644
--- a/target/s390x/kvm/kvm_s390x.h
+++ b/target/s390x/kvm/kvm_s390x.h
@@ -10,7 +10,7 @@
#ifndef KVM_S390X_H
#define KVM_S390X_H
-#include "cpu-qom.h"
+#include "target/s390x/cpu-qom.h"
struct kvm_s390_irq;
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index c7ab4ff57ad..832b98532ea 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -11,7 +11,6 @@
*/
#include "qemu/osdep.h"
-#include CONFIG_DEVICES /* CONFIG_IOMMUFD */
#include <linux/vfio.h>
#include <sys/ioctl.h>
#include "qapi/error.h"
@@ -24,7 +23,7 @@
#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
-#include "kvm/kvm_s390x.h"
+#include "target/s390x/kvm/kvm_s390x.h"
Do I take from this that this is actually a target-specific device?
Otherwise the two s390x changes are confusing.
Is it built once already, due to only being enabled for qemu-system-s390x?
If so, I question the need to move it out of specific_ss at all.
While it happens to be built once, we need to remove specific_ss[]
to be sure everything eventually link, right?
More generally, I'd rather to remove CONFIG_DEVICES altogether.
Anyway, this is two changes -- one for iommufd_builtin and one for
meson.build.
OK.