qemu-devel
[Top][All Lists]
Advanced

[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:45:11 -0200

On Fri, 25 Jan 2013 13:38:18 +0100
Paolo Bonzini <address@hidden> wrote:

> Il 25/01/2013 13:34, Eduardo Habkost ha scritto:
> > On Fri, Jan 25, 2013 at 10:14:43AM -0200, Luiz Capitulino wrote:
> >> 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.
> > 
> > Maybe a GUI that needs to show that debug info should use gdb instead?
> 
> That's a bit heavyweight.

Yes, and the same argument could be made for exposing control registers
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
> > 
> > We already have CPU QOM objects, we just need to add a
> > methods/properties so each per-architecture subclass will implement
> > what's necessary for the command.
> > 
> > We could go even further: just use the qom-* commands. Then if there's
> > some set of registers we really want to expose to the outside, just add
> > them as properties to the CPU object.
> 
> Makes sense.

Oh, agreed. That would be a lot better and I didn't even consider this.

What's the status of the CPU work on QOM? Would it be possible to expose
registers info already or some work is still needed? If work is needed,
what's missing?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]