From: Don Slutz <dslutz@verizon.com>
To: Jan Beulich <JBeulich@suse.com>, Don Slutz <dslutz@verizon.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Don Slutz <Don@CloudSwitch.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 11/12] xenctx: Dump registers via hvm info if available.
Date: Thu, 7 Nov 2013 16:19:34 -0500 [thread overview]
Message-ID: <527C03E6.4060003@terremark.com> (raw)
In-Reply-To: <527B5FB202000078001007C3@nat28.tlf.novell.com>
On 11/07/13 03:38, Jan Beulich wrote:
>>>> On 06.11.13 at 21:08, Don Slutz <dslutz@verizon.com> wrote:
>> @@ -931,7 +1174,44 @@ static void dump_ctx(int vcpu, guest_word_t mem_addr, guest_word_t stk_addr)
>> #endif
>> } else {
>> if (!stk_addr) {
>> - print_ctx(&ctx);
>> +#if defined(__i386__) || defined(__x86_64__)
>> + if (xenctx.dominfo.hvm && ctxt_word_size == 8) {
>> + if (guest_word_size == 4) {
>> + if ((((uint32_t)ctx.x64.user_regs.eip) != cpuctx.rip) ||
>> + (((uint32_t)ctx.x64.user_regs.esp) != cpuctx.rsp) ||
>> + (((uint32_t)ctx.x64.ctrlreg[3]) != cpuctx.cr3)) {
>> + fprintf(stderr, "Regs mismatch ip=%llx vs %llx sp=%llx vs %llx cr3=%llx vs %llx\n",
>> + (long long)((uint32_t)ctx.x64.user_regs.eip),
>> + (long long)cpuctx.rip,
>> + (long long)((uint32_t)ctx.x64.user_regs.esp),
>> + (long long)cpuctx.rsp,
>> + (long long)((uint32_t)ctx.x64.ctrlreg[3]),
>> + (long long)cpuctx.cr3);
>> + fprintf(stdout, "=============Regs mismatch start=============\n");
>> + print_ctx(&ctx);
>> + fprintf(stdout, "=============Regs mismatch end=============\n");
>> + }
>> + } else {
>> + if ((ctx.x64.user_regs.eip != cpuctx.rip) ||
>> + (ctx.x64.user_regs.esp != cpuctx.rsp) ||
>> + (ctx.x64.ctrlreg[3] != cpuctx.cr3)) {
>> + fprintf(stderr, "Regs mismatch ip=%llx vs %llx sp=%llx vs %llx cr3=%llx vs %llx\n",
>> + (long long)ctx.x64.user_regs.eip,
>> + (long long)cpuctx.rip,
>> + (long long)ctx.x64.user_regs.esp,
>> + (long long)cpuctx.rsp,
>> + (long long)ctx.x64.ctrlreg[3],
>> + (long long)cpuctx.cr3);
>> + fprintf(stdout, "=============Regs mismatch start=============\n");
>> + print_ctx(&ctx);
>> + fprintf(stdout, "=============Regs mismatch end=============\n");
>> + }
>> + }
>> + print_cpuctx(&cpuctx);
>> + }
>> + else
>> +#endif
>> + print_ctx(&ctx);
> Apart from Andrew's comments, which I agree with - most of the
> additions above clearly don't belong here: This is not a diagnostic
> utility.
Fine with me, I will drop this part. I added during the time (~2010-2011) when I was looking at a DomU that was crashed. What I remember about this DomU was that vCPU 1 was offline and vCPU 0 was the crash cause and vCPU 2 & 3 where in the code to go offline. The routine xc_domain_hvm_getcontext_partial() was returning vCPU 2's data when asked for vCPU 1 (via instance == 1). This is the key reason I did the code in patch #12 (basically a way to call xc_domain_hvm_getcontext_partial() and xc_vcpu_getcontext() with different args). At the time I was not working on full xen code, just changing xenctx the help me out as needed. Looking at the code now, I do not understand how this could happen.
-Don Slutz
> Jan
>
next prev parent reply other threads:[~2013-11-07 21:23 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 20:08 [PATCH v2 00/12] xenctx: Many changes Don Slutz
2013-11-06 20:08 ` [PATCH v2 01/12] xenctx: Clean up stack trace when hypercall_page not in symbol table Don Slutz
2013-11-07 8:07 ` Jan Beulich
2013-11-07 8:22 ` Ian Campbell
2013-11-07 8:47 ` Jan Beulich
2013-11-07 12:36 ` Ian Campbell
2013-11-07 13:28 ` Don Slutz
2013-11-07 12:38 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 02/12] xenctx: Add -2 (--two-pages) option to switch stack size to 8KiB Don Slutz
2013-11-07 8:04 ` Jan Beulich
2013-11-07 12:40 ` Ian Campbell
2013-11-07 15:24 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 03/12] xenctx: Output ascii version of stack also Don Slutz
2013-11-07 8:09 ` Jan Beulich
2013-11-07 12:43 ` Ian Campbell
2013-11-07 13:17 ` Jan Beulich
2013-11-07 13:21 ` Jan Beulich
2013-11-08 0:12 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 04/12] xenctx: Add stack address to dump, switch to 16 bytes per line Don Slutz
2013-11-07 8:12 ` Jan Beulich
2013-11-07 12:46 ` Ian Campbell
2013-11-08 0:13 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 05/12] xenctx: Change print_symbol to do the space before Don Slutz
2013-11-07 8:13 ` Jan Beulich
2013-11-07 12:47 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 06/12] xenctx: More info on failed to map page Don Slutz
2013-11-07 12:48 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 07/12] xenctx: Add stack addr to call trace Don Slutz
2013-11-07 12:50 ` Ian Campbell
2013-11-07 14:34 ` Don Slutz
2013-11-07 14:44 ` Ian Campbell
2013-11-07 15:06 ` Don Slutz
2013-11-07 16:03 ` Ian Campbell
2013-11-07 18:13 ` Don Slutz
2013-11-08 10:15 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 08/12] xenctx: Add -d <daddr> option to dump memory at daddr as a stack Don Slutz
2013-11-07 8:22 ` Jan Beulich
2013-11-08 0:21 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 09/12] xenctx: Add -m <maddr> option to dump memory at maddr Don Slutz
2013-11-07 8:25 ` Jan Beulich
2013-11-08 0:24 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 10/12] xenctx: change is_kernel_text() into is_kernel_addr() Don Slutz
2013-11-07 8:35 ` Jan Beulich
2013-11-08 0:51 ` Don Slutz
2013-11-08 8:40 ` Jan Beulich
2013-11-08 9:50 ` Ian Campbell
2013-11-08 13:50 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 11/12] xenctx: Dump registers via hvm info if available Don Slutz
2013-11-06 20:35 ` Andrew Cooper
2013-11-07 18:56 ` Don Slutz
2013-11-08 10:13 ` Ian Campbell
2013-11-08 10:29 ` Andrew Cooper
2013-11-08 10:32 ` Ian Campbell
2013-11-07 8:38 ` Jan Beulich
2013-11-07 21:19 ` Don Slutz [this message]
2013-11-06 20:08 ` [PATCH v2 12/12] xenctx: Add optional fCPU Don Slutz
2013-11-07 8:40 ` Jan Beulich
2013-11-07 12:53 ` Ian Campbell
2013-11-07 21:24 ` Don Slutz
2013-11-08 11:29 ` [PATCH v2 00/12] xenctx: Many changes George Dunlap
2013-11-08 12:54 ` Ian Campbell
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=527C03E6.4060003@terremark.com \
--to=dslutz@verizon.com \
--cc=Don@CloudSwitch.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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.