Re: [PATCH v4 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-11-20 Thread zhangyanfei
于 2012年11月20日 08:32, Marcelo Tosatti 写道: > On Fri, Nov 16, 2012 at 06:12:58PM +0800, zhangyanfei wrote: >> Hello Marcelo, >> >> Any thoughts? > > I thought a function call was OK, but its better to have all code in > vmx.c. Please have an atomic notifier in kexec.c (

Re: [PATCH v4 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-11-16 Thread zhangyanfei
Hello Marcelo, Any thoughts? 于 2012年11月14日 17:29, zhangyanfei 写道: > Currently, kdump just makes all the logical processors leave VMX operation by > executing VMXOFF instruction, so any VMCSs active on the logical processors > may > be corrupted. But, sometimes, we need the VMCSs to

[PATCH v4 2/2] KVM: set/unset crash_clear_loaded_vmcss and vmclear_skipped in kvm_intel module

2012-11-14 Thread zhangyanfei
Signed-off-by: Zhang Yanfei --- arch/x86/kvm/vmx.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4ff0ab9..029ec7b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #i

[PATCH v4 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-11-14 Thread zhangyanfei
crash_clear_loaded_vmcss is added to VMCLEAR vmcss loaded on all cpus. And when loading kvm_intel module, the function pointer will be made valid. The percpu variable vmclear_skipped is added to flag the case that if loaded_vmcss_on_cpu list is being modified while the machine crashes and doing kdu

[PATCH v4 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-11-14 Thread zhangyanfei
Currently, kdump just makes all the logical processors leave VMX operation by executing VMXOFF instruction, so any VMCSs active on the logical processors may be corrupted. But, sometimes, we need the VMCSs to debug guest images contained in the host vmcore. To prevent the corruption, we should VMCL

Re: [PATCH v3 2/2] KVM: make crash_clear_loaded_vmcss valid when loading kvm_intel module

2012-11-14 Thread zhangyanfei
于 2012年11月14日 05:22, Marcelo Tosatti 写道: > On Thu, Nov 01, 2012 at 01:55:04PM +0800, zhangyanfei wrote: >> 于 2012年10月31日 17:01, Hatayama, Daisuke 写道: >>> >>> >>>> -Original Message- >>>> From: kexec-boun...@lists.infradead.org >>&

Re: [PATCH v3 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-11-12 Thread zhangyanfei
Hello Marcelo, Do you have any comments about this version? Thanks Zhang 于 2012年10月31日 11:30, zhangyanfei 写道: > Currently, kdump just makes all the logical processors leave VMX operation by > executing VMXOFF instruction, so any VMCSs active on the logical processors > may > be co

Re: [PATCH v3 2/2] KVM: make crash_clear_loaded_vmcss valid when loading kvm_intel module

2012-10-31 Thread zhangyanfei
于 2012年10月31日 17:01, Hatayama, Daisuke 写道: > > >> -Original Message- >> From: kexec-boun...@lists.infradead.org >> [mailto:kexec-boun...@lists.infradead.org] On Behalf Of zhangyanfei >> Sent: Wednesday, October 31, 2012 12:34 PM >> To: x...@kernel

[PATCH v3 2/2] KVM: make crash_clear_loaded_vmcss valid when loading kvm_intel module

2012-10-30 Thread zhangyanfei
Signed-off-by: Zhang Yanfei --- arch/x86/kvm/vmx.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4ff0ab9..f6a16b2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #include #include #inc

[PATCH v3 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-10-30 Thread zhangyanfei
This patch provides a way to VMCLEAR vmcss related to guests on all cpus before executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the vmcore updated and non-corrupted. Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel/crash.c |

[PATCH v3 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-30 Thread zhangyanfei
Currently, kdump just makes all the logical processors leave VMX operation by executing VMXOFF instruction, so any VMCSs active on the logical processors may be corrupted. But, sometimes, we need the VMCSs to debug guest images contained in the host vmcore. To prevent the corruption, we should VMCL

Re: [PATCH 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-10-30 Thread zhangyanfei
re updated and >> non-corrupted. >> >> Signed-off-by: zhangyanfei >> --- >> arch/x86/include/asm/kexec.h |2 ++ >> arch/x86/kernel/crash.c | 27 +++ >> 2 files changed, 29 insertions(+), 0 deletions(-) >> >&g

Re: [PATCH v2 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-25 Thread zhangyanfei
cpus > before > executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the > vmcore updated and non-corrupted. > > Changelog from v1 to v2: > 1. remove the sysctl and clear VMCSs unconditionally. > > zhangyanfei (2): > x86/kexec: VMCLEAR vmcss on all