public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: 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,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>,
	masanori.yoshida.tv@hitachi.com, digitaleric@google.com
Subject: Export offsets of VMCS fields as note information for kdump
Date: Mon, 27 Aug 2012 15:06:23 +0800	[thread overview]
Message-ID: <503B1C6F.2070204@cn.fujitsu.com> (raw)

Hello Avi,

About this VMCSINFO patch, we really need this functionality in our development.
And YOSHIDA Masanori(masanori.yoshida.tv@hitachi.com), the developer from Hitachi,
has said they need this too. So could you please tell us why the patch is unacceptable?
You dislike the whole export-VMCSINFO-thing in all, or you just dislike the way
we implement the path? Finally do you have any suggestion about all this?

Below is why we need this patch and how we will use this patch in our development.

We once came to an abnormal situation: a host scheduler bug caused guest machine's
vcpu stopped for a long time and then led to heartbeat stop (host is still running).
     
We want to have an efficient way to make the bug analysis when we come to the similar
situations where guest machine doesn't work well due to something of host machine's.
Actually, these situations have happened many times, in particular, under development.
  
So here comes the requirement:
If we want to find the root cause, we should debug both host machine's and guest
machine's sides. But first we should get both host machine's crash dump and guest
machine's crash dump and they must be dumped at the same time when the abnormal
situation remains. So the only way to do this is to panic the host with the abnormal
guest running on it and then the guest's image is contained in host's crash dump.

Logically, retrieving guest's crash dump from the host's crash dump is the very
important step to accomplish our goal. Unfortunately, in kvm implementation, some
registers' values of the guest are hidden in vmcs, and vmcs internal is hidden by
Intel. If we could not retrieve these registers from the vmcs, the guest crash dump
we make is incomplete, and some key information is lost when we analyse the guest
crash dump. 

So we make this patch to export the vmcs internal. With the patch applied, we
could write registers' values stored in vmcs into guest's crash dump. And that's
what we want.
  
If a bug was found on customer's environment, we have two ways to avoid
affecting other guest machines running on the same host. First, we could do bug
analysis on another environment to reproduce the buggy situation; Second, we
could migrate other guest machines to other hosts.

After the abnormal situation is reproduced, we panic the host *manually*.
Then we could use userland tools to get guest machine's crash dump from host machine's
with the feature provided by this patch. Finally we could analyse them separately
to find which side causes the problem.

             reply	other threads:[~2012-08-27  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27  7:06 Zhang Yanfei [this message]
2012-09-09 12:00 ` Export offsets of VMCS fields as note information for kdump Avi Kivity

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=503B1C6F.2070204@cn.fujitsu.com \
    --to=zhangyanfei@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=digitaleric@google.com \
    --cc=dzickus@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=ludwig.nussel@suse.de \
    --cc=luto@mit.edu \
    --cc=masanori.yoshida.tv@hitachi.com \
    --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