public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yanfei Zhang <zhangyanfei@cn.fujitsu.com>
To: Eric Northup <digitaleric@google.com>
Cc: Avi Kivity <avi@redhat.com>,
	mtosatti@redhat.com, ebiederm@xmission.com, luto@mit.edu,
	Joerg Roedel <joerg.roedel@amd.com>,
	dzickus@redhat.com, paul.gortmaker@windriver.com,
	ludwig.nussel@suse.de, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, kexec@lists.infradead.org,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2 0/5] Export offsets of VMCS fields as note information for kdump
Date: Tue, 22 May 2012 11:53:27 +0800	[thread overview]
Message-ID: <4FBB0DB7.3040909@cn.fujitsu.com> (raw)
In-Reply-To: <CAG7+5M2nc3qPAS-GvX=YoVKqwdwSGdesoBQ6nsksHp2LFfzYcQ@mail.gmail.com>

于 2012年05月22日 02:58, Eric Northup 写道:
> On Wed, May 16, 2012 at 12:50 AM, zhangyanfei
> <zhangyanfei@cn.fujitsu.com> wrote:
>>
>> This patch set exports offsets of VMCS fields as note information for
>> kdump. We call it VMCSINFO. The purpose of VMCSINFO is to retrieve
>> runtime state of guest machine image, such as registers, in host
>> machine's crash dump as VMCS format. The problem is that VMCS internal
>> is hidden by Intel in its specification. So, we slove this problem
>> by reverse engineering implemented in this patch set. The VMCSINFO
>> is exported via sysfs to kexec-tools just like VMCOREINFO.
> 
> Perhaps I'm wrong, but this solution seems much, much more dynamic
> than it needs to be.
> 
> The VMCS offsets aren't going to change between different boots on the
> same CPU, unless perhaps the microcode has been updated.
> 
> So you can have the VMCS offset dumping be a manually-loaded module.
> Build a database mapping from (CPUID, microcode revision) -> (VMCSINFO).
> There's no need for anything beyond the (CPUID, microcode revision) to
> be put in the kdump, since your offline processing of a kdump can then
> look up the rest.
> 
> It means you don't have to interact with the vmx module at all, and
> no extra modules or code have to be loaded on the millions of Linux
> machines that won't need the functionality.
> 

We have considered this way, but there are two issues:
1) vmx resource is unique for a single cpu, and it's risky to grab it forcibly
on the environment where kvm module is used, in particular on customer's environment.
To do this safely, kvm support is needed.

2) It highly costs to prepare each cpu to each customer environment to collect
vmcsinfo. After all, there are various environments on our customer's.

Our patch provides a module, so those who doesn't want this feature can just
stop it being auto-loaded when system starts up.

Thanks
Zhang Yanfei


  reply	other threads:[~2012-05-22  4:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16  7:50 [PATCH v2 0/5] Export offsets of VMCS fields as note information for kdump zhangyanfei
2012-05-16  7:52 ` [PATCH v2 1/5] x86: Add helper variables and functions to hold VMCSINFO zhangyanfei
2012-06-14 13:28   ` Avi Kivity
2012-05-16  7:54 ` [PATCH v2 2/5] KVM: Export symbols for module vmcsinfo-intel zhangyanfei
2012-05-16  7:55 ` [PATCH v2 3/5] KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO zhangyanfei
2012-06-14 13:37   ` Avi Kivity
2012-06-15  3:03     ` HATAYAMA Daisuke
2012-05-16  7:56 ` [PATCH v2 4/5] ksysfs: Export VMCSINFO via sysfs zhangyanfei
2012-05-16  7:57 ` [PATCH v2 5/5] Documentation: Add ABI entry for sysfs file vmcsinfo and vmcsinfo_maxsize zhangyanfei
2012-06-14 13:21   ` Avi Kivity
2012-05-20 17:43 ` [PATCH v2 0/5] Export offsets of VMCS fields as note information for kdump Avi Kivity
2012-05-21  2:32   ` Yanfei Zhang
2012-05-21  8:34     ` Avi Kivity
2012-05-21  9:08       ` Yanfei Zhang
2012-05-21  9:36         ` Avi Kivity
2012-05-22  3:40           ` Yanfei Zhang
2012-05-28  5:25             ` Yanfei Zhang
2012-05-28 13:28               ` Avi Kivity
2012-05-29  7:06                 ` Yanfei Zhang
2012-06-11  5:35                   ` Yanfei Zhang
2012-06-14 13:15                     ` Avi Kivity
2012-06-18  7:25                       ` YOSHIDA Masanori
2012-05-21 18:58 ` Eric Northup
2012-05-22  3:53   ` Yanfei Zhang [this message]
2012-05-22 20:53     ` Eric Northup

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=4FBB0DB7.3040909@cn.fujitsu.com \
    --to=zhangyanfei@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=digitaleric@google.com \
    --cc=dzickus@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joerg.roedel@amd.com \
    --cc=kexec@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludwig.nussel@suse.de \
    --cc=luto@mit.edu \
    --cc=mtosatti@redhat.com \
    --cc=paul.gortmaker@windriver.com \
    /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