[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command |
Date: |
Fri, 27 Jul 2012 10:01:54 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Peter Maydell <address@hidden> writes:
> On 27 July 2012 14:37, Anthony Liguori <address@hidden> wrote:
>> This command attempts to map to the behavior of -cpu ?. Unfortunately, the
>> output of this command differs wildly across targets.
>
> I've never really understood why so much of the cpu selection
> logic is deferred to target-*...
It will be fixed as part of the QOM conversion.
>> To accomodate this, we use a weak symbol to implement a default version of
>> the
>> command that fails with a QERR_NOT_SUPPORTED error code. Targets can then
>> override and implement this command if it makes sense for them.
>
> This is a bit of a weak reason (boom boom!) for requiring a platform
> specific thing like weak symbols, though, and it's not how we handle
> similar existing cases (eg see the configure/makefile logic for
> memory_mapping.c vs memory_mapping-stub.c).
I don't think we have a consistent approach today FWIW. I think using
weak symbols is sufficiently compelling that it will become consistent.
>
> If having separate configure/make stuff for each of these things
> sounds a bit heavyweight, we could just have a target-stubs.c which
> #includes cpu.h and has a lot of
> #ifndef TARGET_QUERY_CPUDEFS
> [stub version]
> #endif
> #ifndef TARGET_GET_MEMORY_MAPPING
> [stub version]
> #endif
This is pretty hideous.
FWIW, weak symbols are supported on OS X as of 10.2.
Regards,
Anthony Liguori
>
> etc.
>
> -- PMM
- Re: [Qemu-devel] [PATCH 3/7] qapi: add query-machines command, (continued)
[Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command, Anthony Liguori, 2012/07/27
[Qemu-devel] [PATCH 2/7] qapi: mark QOM commands stable, Anthony Liguori, 2012/07/27
[Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command, Anthony Liguori, 2012/07/27
[Qemu-devel] [PATCH 7/7] target-ppc: add implementation of query-cpudefs, Anthony Liguori, 2012/07/27
[Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs, Anthony Liguori, 2012/07/27
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output, Luiz Capitulino, 2012/07/27