From: Zhang Yanfei Subject: Re: [PATCH v8 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary Date: Mon, 26 Nov 2012 09:55:41 +0800 Message-ID: <50B2CC1D.6060708@cn.fujitsu.com> References: <50ADE0C2.1000106@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "x86@kernel.org" , "kexec@lists.infradead.org" , Marcelo Tosatti , Gleb Natapov , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" To: "Eric W. Biederman" Return-path: In-Reply-To: <50ADE0C2.1000106@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Hello Eric Would you help review the patch, and give some comments, please ?=20 Thanks Zhang =E4=BA=8E 2012=E5=B9=B411=E6=9C=8822=E6=97=A5 16:22, Zhang Yanfei =E5=86= =99=E9=81=93: > Currently, kdump just makes all the logical processors leave VMX oper= ation by > executing VMXOFF instruction, so any VMCSs active on the logical proc= essors may > be corrupted. But, sometimes, we need the VMCSs to debug guest images= contained > in the host vmcore. To prevent the corruption, we should VMCLEAR the = VMCSs before > executing the VMXOFF instruction. >=20 > The patch set provides a way to VMCLEAR vmcss related to guests on al= l cpus before > executing the VMXOFF when doing kdump. This is used to ensure the VMC= Ss in the > vmcore updated and non-corrupted. >=20 > Changelog from v7 to v8: > 1. KEXEC: regression for using name crash_notifier_list > and remove comments related to KVM > and just call function atomic_notifier_call_chain directly. >=20 > Changelog from v6 to v7: > 1. KVM-INTEL: in hardware_disable, we needn't disable the > vmclear, so remove it. >=20 > Changelog from v5 to v6: > 1. KEXEC: the atomic notifier list renamed: > crash_notifier_list --> vmclear_notifier_list > 2. KVM-INTEL: provide empty functions if CONFIG_KEXEC is > not defined and remove unnecessary #ifdef's. >=20 > Changelog from v4 to v5: > 1. use an atomic notifier instead of function call, so > have all the vmclear codes in vmx.c. >=20 > Changelog from v3 to v4: > 1. add a new percpu variable vmclear_skipped to skip > vmclear in kdump in some conditions. >=20 > Changelog from v2 to v3: > 1. remove unnecessary conditions in function > cpu_emergency_clear_loaded_vmcss as Marcelo suggested. >=20 > Changelog from v1 to v2: > 1. remove the sysctl and clear VMCSs unconditionally. >=20 > Zhang Yanfei (2): > x86/kexec: add a new atomic notifier list for kdump > KVM-INTEL: add a notifier and a bitmap to support VMCLEAR in kdump >=20 > arch/x86/include/asm/kexec.h | 2 + > arch/x86/kernel/crash.c | 9 +++++ > arch/x86/kvm/vmx.c | 70 ++++++++++++++++++++++++++++++++= ++++++++++ > 3 files changed, 81 insertions(+), 0 deletions(-)