qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TAR


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X
Date: Tue, 22 Aug 2017 17:58:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

David Hildenbrand <address@hidden> writes:

> On 22.08.2017 16:24, Cornelia Huck wrote:
>> On Tue, 22 Aug 2017 15:22:52 +0200
>> Marc-André Lureau <address@hidden> wrote:
>> 
>>> Signed-off-by: Marc-André Lureau <address@hidden>
>>> ---
>>>  qapi-schema.json                        | 10 +++++++---
>>>  include/sysemu/arch_init.h              |  6 ------
>>>  monitor.c                               | 14 --------------
>>>  qmp.c                                   | 14 --------------
>>>  stubs/arch-query-cpu-model-baseline.c   | 12 ------------
>>>  stubs/arch-query-cpu-model-comparison.c | 12 ------------
>>>  target/s390x/cpu_models.c               |  4 ++--
>>>  stubs/Makefile.objs                     |  2 --
>>>  8 files changed, 9 insertions(+), 65 deletions(-)
>>>  delete mode 100644 stubs/arch-query-cpu-model-baseline.c
>>>  delete mode 100644 stubs/arch-query-cpu-model-comparison.c
>>>
>>> diff --git a/qapi-schema.json b/qapi-schema.json
>>> index 58574b3044..d4e1552ddc 100644
>>> --- a/qapi-schema.json
>>> +++ b/qapi-schema.json
>>> @@ -3577,7 +3577,8 @@
>>>  #
>>>  ##
>>>  { 'command': 'dump-skeys',
>>> -  'data': { 'filename': 'str' } }
>>> +  'data': { 'filename': 'str' },
>>> +  'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
>> 
>> I agree with making this s390x specific...
>>>  
>>>  ##
>>>  # @netdev_add:
>>> @@ -4621,7 +4622,9 @@
>>>  ##
>>>  { 'command': 'query-cpu-model-comparison',
>>>    'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
>>> -  'returns': 'CpuModelCompareInfo' }
>>> +  'returns': 'CpuModelCompareInfo',
>>> +  'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
>>> +
>>>  
>>>  ##
>>>  # @CpuModelBaselineInfo:
>>> @@ -4673,7 +4676,8 @@
>>>  { 'command': 'query-cpu-model-baseline',
>>>    'data': { 'modela': 'CpuModelInfo',
>>>              'modelb': 'CpuModelInfo' },
>>> -  'returns': 'CpuModelBaselineInfo' }
>>> +  'returns': 'CpuModelBaselineInfo',
>>> +  'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
>> 
>> ...but I'm not sure about the cpu model stuff. Wasn't the idea to move
>> to this model for all architectures later? (Given that we have stubs
>> for architectures not implementing this, instead of ifdeffing it in
>> monitor.c)
>> 
>
> +1, not architecture specific (in contrast to skey), simply not
> supported _yet_ on other architectures.

Yes, but Marc-André's patch makes the "not supported yet" information
available in query-qmp-schema.  Carrying such information is pretty much
the point of schema introspection.

We could add a comment explaining this command isn't target-specific,
but just happens not to be implemented for some targets.  Would that
help?



reply via email to

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