From: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, rth@twiddle.net,
rkagan@virtuozzo.com
Subject: Re: [Qemu-devel] [PATCH] dump: add kernel_gs_base to QEMU CPU state
Date: Wed, 11 Jul 2018 19:26:09 +0300 [thread overview]
Message-ID: <20180711192609.70582657@vp-pc> (raw)
In-Reply-To: <20180711160025.GU7451@localhost.localdomain>
On Wed, 11 Jul 2018 13:00:25 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Tue, Jul 10, 2018 at 06:21:09PM +0300, Viktor Prutyanov wrote:
> > This patch adds field with content of KERNEL_GS_BASE MSR to QEMU
> > note in ELF dump.
> >
> > On Windows, if all vCPUs are running usermode tasks at the time the
> > dump is created, this can be helpful in the discovery of guest
> > system structures during conversion ELF dump to MEMORY.DMP dump.
> >
> > Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com>
> > ---
> > target/i386/arch_dump.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c
> > index 35b55fc..a702138 100644
> > --- a/target/i386/arch_dump.c
> > +++ b/target/i386/arch_dump.c
> > @@ -237,7 +237,7 @@ int
> > x86_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
> > * please count up QEMUCPUSTATE_VERSION if you have changed
> > definition of
> > * QEMUCPUState, and modify the tools using this information
> > accordingly.
>
> Where are the tools using this information, that need to be
> updated? Won't this break existing versions of those tools?
>
> Is the dump format and pointers to available tools documented
> somewhere?
I hope that someone from community knows about those tools because I
can't find such tools.
>
> > */
> > -#define QEMUCPUSTATE_VERSION (1)
> > +#define QEMUCPUSTATE_VERSION (2)
> >
> > struct QEMUCPUSegment {
> > uint32_t selector;
> > @@ -258,6 +258,7 @@ struct QEMUCPUState {
> > QEMUCPUSegment cs, ds, es, fs, gs, ss;
> > QEMUCPUSegment ldt, tr, gdt, idt;
> > uint64_t cr[5];
> > + uint64_t kernel_gs_base;
> > };
> >
> > typedef struct QEMUCPUState QEMUCPUState;
> > @@ -315,6 +316,8 @@ static void qemu_get_cpustate(QEMUCPUState *s,
> > CPUX86State *env) s->cr[2] = env->cr[2];
> > s->cr[3] = env->cr[3];
> > s->cr[4] = env->cr[4];
> > +
> > + s->kernel_gs_base = env->kernelgsbase;
> > }
> >
> > static inline int cpu_write_qemu_note(WriteCoreDumpFunction f,
> > --
> > 2.7.4
> >
>
next prev parent reply other threads:[~2018-07-11 16:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 15:21 [Qemu-devel] [PATCH] dump: add kernel_gs_base to QEMU CPU state Viktor Prutyanov
2018-07-11 16:00 ` Eduardo Habkost
2018-07-11 16:19 ` Paolo Bonzini
2018-07-11 19:19 ` Eduardo Habkost
2018-07-11 16:26 ` Viktor Prutyanov [this message]
2018-07-11 16:31 ` Paolo Bonzini
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=20180711192609.70582657@vp-pc \
--to=viktor.prutyanov@virtuozzo.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkagan@virtuozzo.com \
--cc=rth@twiddle.net \
/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.