All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: zhangyanfei <zhangyanfei@cn.fujitsu.com>,
	mtosatti@redhat.com, ebiederm@xmission.com, luto@mit.edu,
	joerg.roedel@amd.com, dzickus@redhat.com,
	paul.gortmaker@windriver.com, gregkh@suse.de,
	ludwig.nussel@suse.de, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, kexec@lists.infradead.org
Subject: Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump
Date: Tue, 17 Apr 2012 16:04:33 +0300	[thread overview]
Message-ID: <4F8D6A61.9030209@redhat.com> (raw)
In-Reply-To: <4F8D530C.3050908@cn.fujitsu.com>

On 04/17/2012 02:25 PM, Wen Congyang wrote:
> > 
> >>
> >> For scenario 2, we also want the guest's registers values to be dumped into
> >> qemu process's core file when qemu process crashes. This is the task of TODO-list 2.
> > 
> > Why?  If qemu crashed it is because of an internal qemu fault.  If any
> > guest registers were involved, they would have been decoded by qemu
> > previously and would be present in the stack trace (for example mmio
> > address/data).
>
> Hmm, IIRC, if qemu meets some critical error, it will call abort() or assert().
> The guest registers are stored in the kernel, and qemu does not call
> cpu_synchronize_state() to get guest register. So I donot understand
> why the registers woubld be present int the stack trace...

There are two cases.  One case is where the problem was not caused
directly by guest action, for example a segmentation fault in the block
layer or the VNC server.  In this case the guest registers are immaterial.

The other case is where the problem was directly caused by guest action,
for example an mmio write to a device register triggered an error. In
this case kvm emulates the mmio instruction and returns KVM_EXIT_MMIO;
it can be seen in the kvm_run page.  The address/data pair is propagated
by the qemu memory core all the way to the device callback.  So the
instruction and register contents are unneeded for debugging the crash.

Is there a scenario where the guest registers help towards debugging a
qemu crash?

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Wen Congyang <wency-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	luto-3s7WtUTddSA@public.gmane.org,
	gregkh-l3A5Bk7waGM@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	joerg.roedel-5C7GfCeVMHo@public.gmane.org,
	mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org,
	zhangyanfei <zhangyanfei-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
	ludwig.nussel-l3A5Bk7waGM@public.gmane.org
Subject: Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump
Date: Tue, 17 Apr 2012 16:04:33 +0300	[thread overview]
Message-ID: <4F8D6A61.9030209@redhat.com> (raw)
In-Reply-To: <4F8D530C.3050908-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>

On 04/17/2012 02:25 PM, Wen Congyang wrote:
> > 
> >>
> >> For scenario 2, we also want the guest's registers values to be dumped into
> >> qemu process's core file when qemu process crashes. This is the task of TODO-list 2.
> > 
> > Why?  If qemu crashed it is because of an internal qemu fault.  If any
> > guest registers were involved, they would have been decoded by qemu
> > previously and would be present in the stack trace (for example mmio
> > address/data).
>
> Hmm, IIRC, if qemu meets some critical error, it will call abort() or assert().
> The guest registers are stored in the kernel, and qemu does not call
> cpu_synchronize_state() to get guest register. So I donot understand
> why the registers woubld be present int the stack trace...

There are two cases.  One case is where the problem was not caused
directly by guest action, for example a segmentation fault in the block
layer or the VNC server.  In this case the guest registers are immaterial.

The other case is where the problem was directly caused by guest action,
for example an mmio write to a device register triggered an error. In
this case kvm emulates the mmio instruction and returns KVM_EXIT_MMIO;
it can be seen in the kvm_run page.  The address/data pair is propagated
by the qemu memory core all the way to the device callback.  So the
instruction and register contents are unneeded for debugging the crash.

Is there a scenario where the guest registers help towards debugging a
qemu crash?

-- 
error compiling committee.c: too many arguments to function

WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: dzickus@redhat.com, luto@mit.edu, gregkh@suse.de,
	kvm@vger.kernel.org, joerg.roedel@amd.com, mtosatti@redhat.com,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	paul.gortmaker@windriver.com,
	zhangyanfei <zhangyanfei@cn.fujitsu.com>,
	ebiederm@xmission.com, ludwig.nussel@suse.de
Subject: Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump
Date: Tue, 17 Apr 2012 16:04:33 +0300	[thread overview]
Message-ID: <4F8D6A61.9030209@redhat.com> (raw)
In-Reply-To: <4F8D530C.3050908@cn.fujitsu.com>

On 04/17/2012 02:25 PM, Wen Congyang wrote:
> > 
> >>
> >> For scenario 2, we also want the guest's registers values to be dumped into
> >> qemu process's core file when qemu process crashes. This is the task of TODO-list 2.
> > 
> > Why?  If qemu crashed it is because of an internal qemu fault.  If any
> > guest registers were involved, they would have been decoded by qemu
> > previously and would be present in the stack trace (for example mmio
> > address/data).
>
> Hmm, IIRC, if qemu meets some critical error, it will call abort() or assert().
> The guest registers are stored in the kernel, and qemu does not call
> cpu_synchronize_state() to get guest register. So I donot understand
> why the registers woubld be present int the stack trace...

There are two cases.  One case is where the problem was not caused
directly by guest action, for example a segmentation fault in the block
layer or the VNC server.  In this case the guest registers are immaterial.

The other case is where the problem was directly caused by guest action,
for example an mmio write to a device register triggered an error. In
this case kvm emulates the mmio instruction and returns KVM_EXIT_MMIO;
it can be seen in the kvm_run page.  The address/data pair is propagated
by the qemu memory core all the way to the device callback.  So the
instruction and register contents are unneeded for debugging the crash.

Is there a scenario where the guest registers help towards debugging a
qemu crash?

-- 
error compiling committee.c: too many arguments to function


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2012-04-17 13:04 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  1:39 [PATCH 0/4] Export offsets of VMCS fields as note information for kdump zhangyanfei
2012-04-11  1:39 ` zhangyanfei
2012-04-11  1:49 ` [PATCH 1/4] x86: Add helper variables and functions to hold VMCSINFO zhangyanfei
2012-04-11  1:49   ` zhangyanfei
2012-04-11  1:50 ` [PATCH 2/4] KVM: VMX: Add functions to fill VMCSINFO zhangyanfei
2012-04-11  1:50   ` zhangyanfei
2012-04-11  8:48   ` Avi Kivity
2012-04-11  8:48     ` Avi Kivity
2012-04-11  8:48     ` Avi Kivity
2012-04-11 10:34     ` zhangyanfei
2012-04-11 10:34       ` zhangyanfei
2012-04-11 10:34       ` zhangyanfei
2012-04-11 11:41       ` Avi Kivity
2012-04-11 11:41         ` Avi Kivity
2012-04-11 11:41         ` Avi Kivity
2012-04-11  1:57 ` [PATCH 3/4] ksysfs: export VMCSINFO via sysfs zhangyanfei
2012-04-11  1:57   ` zhangyanfei
2012-04-11  1:57   ` zhangyanfei
2012-04-12 23:00   ` Greg KH
2012-04-12 23:00     ` Greg KH
2012-04-12 23:00     ` Greg KH
2012-04-17  1:52     ` zhangyanfei
2012-04-17  1:52       ` zhangyanfei
2012-04-17  2:30       ` Greg KH
2012-04-17  2:30         ` Greg KH
2012-04-11  1:58 ` [PATCH 4/4] kexec: Add crash_save_vmcsinfo to update VMCSINFO zhangyanfei
2012-04-11  1:58   ` zhangyanfei
2012-04-11  1:58   ` zhangyanfei
2012-04-11  8:56 ` [PATCH 0/4] Export offsets of VMCS fields as note information for kdump Avi Kivity
2012-04-11  8:56   ` Avi Kivity
2012-04-11 10:12   ` zhangyanfei
2012-04-11 10:12     ` zhangyanfei
2012-04-11 10:12     ` zhangyanfei
2012-04-11 11:15     ` Avi Kivity
2012-04-11 11:15       ` Avi Kivity
2012-04-11 10:21 ` Joerg Roedel
2012-04-11 10:21   ` Joerg Roedel
2012-04-11 10:21   ` Joerg Roedel
2012-04-11 10:49   ` Avi Kivity
2012-04-11 10:49     ` Avi Kivity
2012-04-11 10:49     ` Avi Kivity
2012-04-11 10:59   ` zhangyanfei
2012-04-11 10:59     ` zhangyanfei
2012-04-11 10:59     ` zhangyanfei
2012-04-17  7:44 ` Avi Kivity
2012-04-17  7:44   ` Avi Kivity
2012-04-17  7:44   ` Avi Kivity
2012-04-17 10:51   ` zhangyanfei
2012-04-17 10:51     ` zhangyanfei
2012-04-17 10:51     ` zhangyanfei
2012-04-17 10:59     ` Avi Kivity
2012-04-17 10:59       ` Avi Kivity
2012-04-17 10:59       ` Avi Kivity
2012-04-17 11:25       ` Wen Congyang
2012-04-17 11:25         ` Wen Congyang
2012-04-17 11:25         ` Wen Congyang
2012-04-17 13:04         ` Avi Kivity [this message]
2012-04-17 13:04           ` Avi Kivity
2012-04-17 13:04           ` Avi Kivity
2012-04-18  7:30       ` zhangyanfei
2012-04-18  7:30         ` zhangyanfei
2012-04-18  7:30         ` zhangyanfei
2012-04-18  8:24         ` Avi Kivity
2012-04-18  8:24           ` Avi Kivity
2012-04-18  8:24           ` Avi Kivity
2012-04-18  9:49           ` zhangyanfei
2012-04-18  9:49             ` zhangyanfei
2012-04-18  9:49             ` zhangyanfei
2012-04-18 11:56             ` Avi Kivity
2012-04-18 11:56               ` Avi Kivity
2012-04-18 11:56               ` Avi Kivity
2012-04-19 10:36               ` HATAYAMA Daisuke
2012-04-19 10:36                 ` HATAYAMA Daisuke
2012-04-19 10:36                 ` HATAYAMA Daisuke
2012-04-19 10:42                 ` Avi Kivity
2012-04-19 10:42                   ` Avi Kivity
2012-04-19 10:42                   ` Avi Kivity
2012-04-19 11:27                   ` HATAYAMA Daisuke
2012-04-19 11:27                     ` HATAYAMA Daisuke
2012-04-19 11:27                     ` HATAYAMA Daisuke
2012-04-19 11:31                     ` Avi Kivity
2012-04-19 11:31                       ` Avi Kivity
2012-04-19 11:31                       ` Avi Kivity
2012-04-19 12:01                       ` HATAYAMA Daisuke
2012-04-19 12:01                         ` HATAYAMA Daisuke
2012-04-19 12:01                         ` HATAYAMA Daisuke
2012-04-19 12:08                         ` Avi Kivity
2012-04-19 12:08                           ` Avi Kivity
2012-04-19 12:08                           ` Avi Kivity
2012-04-20 10:11                           ` HATAYAMA Daisuke
2012-04-20 10:11                             ` HATAYAMA Daisuke
2012-04-20 10:11                             ` HATAYAMA Daisuke
2012-04-22  9:58                             ` Avi Kivity
2012-04-22  9:58                               ` Avi Kivity
2012-04-22 10:33                               ` Gleb Natapov
2012-04-22 10:33                                 ` Gleb Natapov
2012-04-22 10:33                                 ` Gleb Natapov
2012-04-22 10:57                                 ` Avi Kivity
2012-04-22 10:57                                   ` Avi Kivity
2012-04-22 10:57                                   ` Avi Kivity
2012-04-17 16:49   ` Anthony Liguori
2012-04-18 12:13     ` Avi Kivity
2012-04-18 12:13       ` Avi Kivity
2012-04-18 12:13       ` Avi Kivity
2012-04-18 13:47       ` Nadav Har'El
2012-04-18 13:47         ` Nadav Har'El
2012-04-18 14:06         ` Avi Kivity
2012-04-18 14:06           ` Avi Kivity
2012-04-18 14:06           ` 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=4F8D6A61.9030209@redhat.com \
    --to=avi@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@suse.de \
    --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 \
    --cc=wency@cn.fujitsu.com \
    --cc=zhangyanfei@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.