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
+++ /dev/null
-// 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;
-}
-
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 */