On 7/17/2026 12:26 PM, Pierrick Bouvier wrote: > On 7/17/2026 11:51 AM, Michael Tokarev wrote: >> On 3/13/26 01:44, Pierrick Bouvier wrote: >>> Code concerned is under a kvm_enabled() guard. >>> >>> Signed-off-by: Pierrick Bouvier <[email protected]> >>> --- >>> hw/vfio/listener.c | 4 ---- >>> 1 file changed, 4 deletions(-) >>> >>> diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c >>> index 960da9e0a93..31c3113f8fb 100644 >>> --- a/hw/vfio/listener.c >>> +++ b/hw/vfio/listener.c >>> @@ -20,9 +20,7 @@ >>> #include "qemu/osdep.h" >>> #include <sys/ioctl.h> >>> -#ifdef CONFIG_KVM >>> #include <linux/kvm.h> >>> -#endif >>> #include <linux/vfio.h> >> >> This now fails to build on sparc64: >> >> In file included from ../../hw/vfio/listener.c:23: >> /build/reproducible-path/qemu-11.1.0~rc0+ds/linux-headers/linux/ >> kvm.h:16:10: fatal error: asm/kvm.h: No such file or directory >> 16 | #include <asm/kvm.h> >> | ^~~~~~~~~~~ >> > > It seems like it was unnoticed because we don't test cross builds for > this platform. We can't guess something not tested is broken. > Seems like it should be added to CI if we want to keep it working on > these hosts in the future. > >> I wonder if this is a sparc problem or qemu problem. >> > > QEMU issue. > >> I don't think kvm has been enabled on sparc, ever.> > > Right. > If I'm correct, it should imply that vfio is not supported as well, > which means that hw/vfio should not be built at all on this host. > meson.build correctly adds files only when CONFIG_VFIO is set. > > So you can a look at why CONFIG_VFIO is set on sparc64 host first. By > fixing this, and it will fix the build compilation by not including > those files. >
https://gitlab.com/qemu-project/qemu/-/blob/master/hw/vfio/Kconfig?ref_type=heads#L5 ``` config VFIO bool depends on LINUX ``` Incorrect, and it should exclude Linux hosts not supporting VFIO. At least sparc64 to fix the current issue. > For more safety in the future, feel free to add a sparc64 cross > container (debian-sparc64-cross.docker) + a CI build job using it. > > If you're stuck, feel free to ping for help :). > >> Thanks, >> >> /mjt >> > > Regards, > Pierrick
