* [PATCH] vfio: unhide vdev->debug_root
@ 2026-03-27 16:55 Arnd Bergmann
2026-03-30 22:54 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-03-27 16:55 UTC (permalink / raw)
To: Alex Williamson
Cc: Arnd Bergmann, Kevin Tian, Jason Gunthorpe, kvm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When debugfs is disabled, the hisilicon driver now fails to build:
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vfio_debug_init':
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:1671:62: error: 'struct vfio_device' has no member named 'debug_root'
1671 | vfio_dev_migration = debugfs_lookup("migration", vdev->debug_root);
| ^~
The driver otherwise relies on dead-code elimination, but this reference
fails. The single struct member is not going to make much of a difference
for memory consumption, so just keep this visible unconditionally.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
----
This seems to be a new build failure, but I could not pinpoint which
commit caused it, as both the #ifdef and the the use were introduced
a while ago.
---
include/linux/vfio.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 50b474334a19..31b826efba00 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -74,13 +74,11 @@ struct vfio_device {
u8 iommufd_attached:1;
#endif
u8 cdev_opened:1;
-#ifdef CONFIG_DEBUG_FS
/*
* debug_root is a static property of the vfio_device
* which must be set prior to registering the vfio_device.
*/
struct dentry *debug_root;
-#endif
};
/**
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] vfio: unhide vdev->debug_root
2026-03-27 16:55 [PATCH] vfio: unhide vdev->debug_root Arnd Bergmann
@ 2026-03-30 22:54 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2026-03-30 22:54 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Kevin Tian, Jason Gunthorpe, kvm, linux-kernel,
alex, liulongfang
On Fri, 27 Mar 2026 17:55:08 +0100
Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When debugfs is disabled, the hisilicon driver now fails to build:
>
> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vfio_debug_init':
> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:1671:62: error: 'struct vfio_device' has no member named 'debug_root'
> 1671 | vfio_dev_migration = debugfs_lookup("migration", vdev->debug_root);
> | ^~
>
> The driver otherwise relies on dead-code elimination, but this reference
> fails. The single struct member is not going to make much of a difference
> for memory consumption, so just keep this visible unconditionally.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ----
> This seems to be a new build failure, but I could not pinpoint which
> commit caused it, as both the #ifdef and the the use were introduced
> a while ago.
> ---
They were introduced some time apart, but I'd attribute it to the use
here in the hisi_acc driver, ie. Fixes: b398f91779b8
("hisi_acc_vfio_pci: register debugfs for hisilicon migration driver").
The series introducing debug_root had proper stubs to avoid references.
I'll add that on commit, otherwise LGTM. Thanks,
Alex
> include/linux/vfio.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/vfio.h b/include/linux/vfio.h
> index 50b474334a19..31b826efba00 100644
> --- a/include/linux/vfio.h
> +++ b/include/linux/vfio.h
> @@ -74,13 +74,11 @@ struct vfio_device {
> u8 iommufd_attached:1;
> #endif
> u8 cdev_opened:1;
> -#ifdef CONFIG_DEBUG_FS
> /*
> * debug_root is a static property of the vfio_device
> * which must be set prior to registering the vfio_device.
> */
> struct dentry *debug_root;
> -#endif
> };
>
> /**
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-30 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 16:55 [PATCH] vfio: unhide vdev->debug_root Arnd Bergmann
2026-03-30 22:54 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox