From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: x86@kernel.org, kexec@lists.infradead.org,
linux-doc@vger.kernel.org, Avi Kivity <avi@redhat.com>,
mtosatti@redhat.com
Cc: linux-kernel@vger.kernel.org,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: [PATCH 3/3] sysctl: introduce a new interface to control kdump-vmcs-clear behaviour
Date: Fri, 12 Oct 2012 14:45:22 +0800 [thread overview]
Message-ID: <5077BC82.6050105@cn.fujitsu.com> (raw)
In-Reply-To: <5077BB7B.4030203@cn.fujitsu.com>
This patch exports the variable clear_loaded_vmcs_enabled to userspace.
Signed-off-by: zhangyanfei <zhangyanfei@cn.fujitsu.com>
---
Documentation/sysctl/kernel.txt | 8 ++++++++
kernel/sysctl.c | 10 ++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 6d78841..038148b 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -25,6 +25,7 @@ show up in /proc/sys/kernel:
- bootloader_version [ X86 only ]
- callhome [ S390 only ]
- cap_last_cap
+- clear_loaded_vmcs [ X86 only ]
- core_pattern
- core_pipe_limit
- core_uses_pid
@@ -164,6 +165,13 @@ CAP_LAST_CAP from the kernel.
==============================================================
+clear_loaded_vmcs
+
+Controls if VMCSs should be cleared when host is doing kdump. Exports
+clear_loaded_vmcs_enabled from the kernel.
+
+==============================================================
+
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4ab1187..3ab7d9c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -63,6 +63,7 @@
#include <asm/uaccess.h>
#include <asm/processor.h>
+#include <asm/kexec.h>
#ifdef CONFIG_X86
#include <asm/nmi.h>
@@ -994,6 +995,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = proc_dointvec,
},
#endif
+#ifdef CONFIG_KEXEC
+ {
+ .procname = "clear_loaded_vmcs",
+ .data = &clear_loaded_vmcs_enabled,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+#endif
{ }
};
--
1.7.1
next prev parent reply other threads:[~2012-10-12 6:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 6:40 [PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary Zhang Yanfei
2012-10-12 6:43 ` [PATCH 1/3] x86/kexec: clear vmcss on all cpus " Zhang Yanfei
2012-10-12 6:44 ` [PATCH 2/3] KVM: make crash_clear_loaded_vmcss valid when kvm_intel is loaded Zhang Yanfei
2012-10-12 6:45 ` Zhang Yanfei [this message]
[not found] ` <5077BB7B.4030203-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-10-15 15:43 ` [PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary Avi Kivity
2012-10-17 2:28 ` Zhang Yanfei
2012-10-17 10:16 ` Avi Kivity
2012-10-18 1:12 ` Zhang Yanfei
2012-10-18 10:55 ` Avi Kivity
2012-10-19 4:51 ` Zhang Yanfei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5077BC82.6050105@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=avi@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).