[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] X86/HMP: Expose x86 model specific registers vi
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH] X86/HMP: Expose x86 model specific registers via human monitor |
Date: |
Wed, 8 Mar 2017 15:44:26 -0300 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Wed, Mar 08, 2017 at 05:08:42PM +0100, Julian Kirsch wrote:
> On 08.03.2017 14:57, Eduardo Habkost wrote:
>
> >>
> >> This should be abstracted some how so that we don't need
> >> x86 specifics in cpus.c; perhaps just an architecture call
> >> back on the CPU.
> >
> > If it's only supported by x86, I would just move the
> > implementation to a x86-specific file, and add a stub for the
> > other architectures. See qmp_query_gic_capabilities() for an
> > example.
> >
> > Also, the command should be added to
> > qmp_unregister_commands_hack() so we don't even report it as
> > available on other architectures.
> >
>
> Awesome, thanks for your comments, I'll move the qmp commands to
> target/i386/monitor.c and unregister them for architectures other than I386.
> Do
> I have to explicitly take care of unregistering the hmp commands as well?
For HMP commands, it looks like you can simply use #ifdefs inside
hmp-commands.hx.
--
Eduardo
Re: [Qemu-devel] [PATCH] X86/HMP: Expose x86 model specific registers via human monitor, Julian Kirsch, 2017/03/08