[PATCH] KVM: introduce vm's max_halt_poll_ns to debugfs

cheng.lin130
2024-05-08T10:47:56Z

From: Cheng Lin <cheng.lin130@zte.com.cn>

Introduce vm's max_halt_poll_ns and override_halt_poll_ns to
debugfs. Provide a way to check and modify them.

Signed-off-by: Cheng Lin <cheng.lin130@zte.com.cn>
---
virt/kvm/kvm_main.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ff0a20565..60dae952c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1151,6 +1151,11 @@ static int kvm_create_vm_debugfs(struct kvm *kvm, const char *fdname)
&stat_fops_per_vm);
}

+ debugfs_create_bool("override_halt_poll_ns", 0444, kvm->debugfs_dentry,
+ &kvm->override_halt_poll_ns);
+ debugfs_create_u32("max_halt_poll_ns", 0644, kvm->debugfs_dentry,
+ &kvm->max_halt_poll_ns);
+
kvm_arch_create_vm_debugfs(kvm);
return 0;
out_err:
--
2.18.1