[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus |
Date: |
Fri, 25 Jan 2013 10:54:03 -0200 |
On Fri, 25 Jan 2013 13:51:14 +0100
Andreas Färber <address@hidden> wrote:
> Am 25.01.2013 13:14, schrieb Luiz Capitulino:
> > On Thu, 24 Jan 2013 13:12:08 -0500
> > Peter Feiner <address@hidden> wrote:
> >
> >>> What about converting 'info registers' to QMP (ie. having
> >>> query-cpu-registers)?
> >>
> >> We had thought about it, but we decided to go with this lower hanging fruit
> >> because it provides immediately useful functionality at a low
> >> implementation
> >> cost. It's harder (for us) to think of why would anyone want to know XMM12
> >> or
> >> r10 in the general case outside of gdb, which is already supported.
> >
> > For the same reason you need the other registers now. Besides, it would be
> > nice to allow GUIs to have more debug info like this.
> >
> > Let me re-state the problem for the CC'ed people: you're adding x86 control
> > registers to the query-cpus command. I think this has a few problems:
> >
> > 1. Won't "scale", as query-cpus will become a huge mess if people start
> > doing this for other archs
> >
> > 2. query-cpus is bad designed. I'd prefer adding new commands instead of
> > extending it (unless the information is general enough)
> >
> > 3. It's very desirable to have registers info in QMP
> >
> > The obvious suggestion is to add query-cpu-registers. I understand this has
> > a
> > few problems (see questions below), but I think the following incremental
> > approach could work:
> >
> > 1. Add a CPURegisters union
> > 2. Each CPU arch is added as a type to the union (eg. CPUX86Registers)
> > 3. query-cpu-registers returns the union
> > 4. Move do_info_registers() to hmp.c as hmp_info_registers()
> > 5. Change hmp_info_registers() to first call qmp_query_cpu_registers(), if
> > this returns the CPU arch it expects, then print it. Otherwise fallback
> > to cpu_dump_state()
> >
> > You start by adding CPUX86Registers. Other CPUs are added as needed.
> >
> > What do the CC'ed people think?
>
> I wonder why this needs to be a custom QMP command?
It doesn't. I just forgot about QOM when responding to the original email.
See my last email to this thread.
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, (continued)
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Luiz Capitulino, 2013/01/24
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Peter Feiner, 2013/01/24
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Luiz Capitulino, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Eduardo Habkost, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Paolo Bonzini, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Luiz Capitulino, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Eduardo Habkost, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Andreas Färber, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus, Andreas Färber, 2013/01/25
- Re: [Qemu-devel] [PATCH] qapi/x86: add control registers to query-cpus,
Luiz Capitulino <=