From patchwork Wed May 8 10:47:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Lin X-Patchwork-Id: 13658515 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A62F2836D; Wed, 8 May 2024 10:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715165279; cv=none; b=MATLTSxwd6RsElsAnXWmxvsqIRljMrD1isVvTCcvI8X6dUdhQ7zaBQOu17xNG9eiHY7+rifV8/zOze1OUzqr8txcknP9ubWAtR2exQ4hre2TWzLbMACEpb2od1+BvPv/VrANOc9Bl64uPGPlUPv+uLbyGkvp6pYMtYveDf9UA70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715165279; c=relaxed/simple; bh=+MeneR5VBNEb2SdP/icWDmNsj1Rc5U6B2Yd4fQBwbcc=; h=Date:Message-ID:Mime-Version:From:To:Cc:Subject:Content-Type; b=qL9VJj3FoFNDXDtY8bZjFtkxHb7+1YRhiYDkaT0GBnLRQNME0hIMZ7h47rSVWdCYfDIvXCBiN4s1Y8J84+9rM70L3I6cU+fhalJyOvyEk6QkICJstuKQC79E+dII5cgJBzyd+9R+Bqt/KrTThGjwNCuPeWF3bg/17/P5tJiWCcA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4VZBgN4rRBz8XrSC; Wed, 8 May 2024 18:47:44 +0800 (CST) Received: from szxlzmapp02.zte.com.cn ([10.5.231.79]) by mse-fl1.zte.com.cn with SMTP id 448AleAv005282; Wed, 8 May 2024 18:47:40 +0800 (+08) (envelope-from cheng.lin130@zte.com.cn) Received: from mapi (szxlzmapp04[null]) by mapi (Zmail) with MAPI id mid14; Wed, 8 May 2024 18:47:43 +0800 (CST) Date: Wed, 8 May 2024 18:47:43 +0800 (CST) X-Zmail-TransId: 2b06663b584fffffffff84b-63ef0 X-Mailer: Zmail v1.0 Message-ID: <20240508184743778PSWkv_r8dMoye7WmZ7enP@zte.com.cn> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?q?=5BPATCH=5D_KVM=3A_introduce_vm=27s_max=5Fhalt=5Fpoll=5Fn?= =?utf-8?q?s_to_debugfs?= X-MAIL: mse-fl1.zte.com.cn 448AleAv005282 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 663B5850.000/4VZBgN4rRBz8XrSC From: Cheng Lin 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 --- 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: