]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/xen: Remove Xen debugfs support
authorJuergen Gross <jgross@suse.com>
Fri, 22 May 2026 15:21:14 +0000 (17:21 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 8 Jun 2026 07:20:12 +0000 (09:20 +0200)
The only Xen file in debugfs is for dumping the p2m table when running
as a Xen PV guest. This might have been useful when the PV code was
young, but there haven't been any p2m related bugs requiring the p2m
dump since ages.

Remove the code and the related config option.

Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260522152114.77319-4-jgross@suse.com>

arch/x86/xen/Kconfig
arch/x86/xen/Makefile
arch/x86/xen/debugfs.c [deleted file]
arch/x86/xen/p2m.c
arch/x86/xen/xen-ops.h

index aa4040fd921560fd2180a37ea53f18c8a5851eab..51b53ce66efbe2b636e0f1e3fb4c62f98575aa13 100644 (file)
@@ -65,13 +65,6 @@ config XEN_PVHVM_GUEST
        help
          Support running as a Xen PVHVM guest.
 
-config XEN_DEBUG_FS
-       bool "Enable Xen debug and tuning parameters in debugfs"
-       depends on XEN && DEBUG_FS
-       help
-         Enable statistics output and various tuning options in debugfs.
-         Enabling this option may incur a significant performance overhead.
-
 config XEN_PVH
        bool "Xen PVH guest support"
        depends on XEN && XEN_PVHVM && ACPI
index a9ec8c9f5c5dd04fd7747d943b791adf9d9b1025..717264ae269b1e3a78440d7a0752ed73170cd782 100644 (file)
@@ -43,8 +43,6 @@ obj-$(CONFIG_XEN_PVHVM_SMP)   += smp_hvm.o
 
 obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
 
-obj-$(CONFIG_XEN_DEBUG_FS)     += debugfs.o
-
 obj-$(CONFIG_XEN_DOM0)         += vga.o
 
 obj-$(CONFIG_XEN_EFI)          += efi.o
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c
deleted file mode 100644 (file)
index b8c9f2a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/init.h>
-#include <linux/debugfs.h>
-#include <linux/slab.h>
-
-#include "xen-ops.h"
-
-static struct dentry *d_xen_debug;
-
-struct dentry * __init xen_init_debugfs(void)
-{
-       if (!d_xen_debug)
-               d_xen_debug = debugfs_create_dir("xen", NULL);
-       return d_xen_debug;
-}
-
index 2dd12b61a230ad2e363d5c8bf57d22c9d3a657f1..d007ccf6e7a1185b4cdfdf6b5046d657f15e8dfa 100644 (file)
@@ -883,48 +883,3 @@ void __init xen_add_remap_nonram(phys_addr_t maddr, phys_addr_t paddr,
 
        nr_nonram_remap++;
 }
-
-#ifdef CONFIG_XEN_DEBUG_FS
-#include <linux/debugfs.h>
-static int p2m_dump_show(struct seq_file *m, void *v)
-{
-       static const char * const type_name[] = {
-                               [P2M_TYPE_IDENTITY] = "identity",
-                               [P2M_TYPE_MISSING] = "missing",
-                               [P2M_TYPE_PFN] = "pfn",
-                               [P2M_TYPE_UNKNOWN] = "abnormal"};
-       unsigned long pfn, first_pfn;
-       int type, prev_type;
-
-       prev_type = xen_p2m_elem_type(0);
-       first_pfn = 0;
-
-       for (pfn = 0; pfn < xen_p2m_size; pfn++) {
-               type = xen_p2m_elem_type(pfn);
-               if (type != prev_type) {
-                       seq_printf(m, " [0x%lx->0x%lx] %s\n", first_pfn, pfn,
-                                  type_name[prev_type]);
-                       prev_type = type;
-                       first_pfn = pfn;
-               }
-       }
-       seq_printf(m, " [0x%lx->0x%lx] %s\n", first_pfn, pfn,
-                  type_name[prev_type]);
-       return 0;
-}
-
-DEFINE_SHOW_ATTRIBUTE(p2m_dump);
-
-static struct dentry *d_mmu_debug;
-
-static int __init xen_p2m_debugfs(void)
-{
-       struct dentry *d_xen = xen_init_debugfs();
-
-       d_mmu_debug = debugfs_create_dir("mmu", d_xen);
-
-       debugfs_create_file("p2m", 0600, d_mmu_debug, NULL, &p2m_dump_fops);
-       return 0;
-}
-fs_initcall(xen_p2m_debugfs);
-#endif /* CONFIG_XEN_DEBUG_FS */
index a27ab1f50cf95df62fb072d62972547942be4142..6808010ac37903f2797a5866112b3429c5e07f09 100644 (file)
@@ -254,8 +254,6 @@ static inline void xen_hvm_post_suspend(int suspend_cancelled) {}
 
 void xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns);
 
-struct dentry * __init xen_init_debugfs(void);
-
 bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
 void xen_hvm_init_mmu_ops(void);