[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/3] arm: qmp: add query-gic-capabilities int
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/3] arm: qmp: add query-gic-capabilities interface |
Date: |
Wed, 16 Mar 2016 10:24:39 +0000 |
On 8 March 2016 at 07:36, Peter Xu <address@hidden> wrote:
> This patch adds the command "query-gic-capabilities" but not implemnet
> it. The command is ARM-only. Return of the command is a list of
> GICCapability struct that describes all GIC versions that current QEMU
> and system support.
>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> monitor.c | 8 ++++++++
> qapi-schema.json | 11 +++++++++++
> qmp-commands.hx | 26 ++++++++++++++++++++++++++
> scripts/qapi.py | 1 +
> target-arm/machine.c | 6 ++++++
> 5 files changed, 52 insertions(+)
>
> diff --git a/monitor.c b/monitor.c
> index 73eac17..9e8cbdb 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4241,3 +4241,11 @@ void qmp_dump_skeys(const char *filename, Error **errp)
> error_setg(errp, QERR_FEATURE_DISABLED, "dump-skeys");
> }
> #endif
> +
> +#ifndef TARGET_ARM
> +GICCapabilityList *qmp_query_gic_capabilities(Error **errp)
> +{
> + error_setg(errp, QERR_FEATURE_DISABLED, "query-gic-capabilities");
> + return NULL;
> +}
> +#endif
Given where we are in the release cycle I guess we need to do this,
but longer term we should sort out a structure so we can add
target-specific qmp and hmp commands without having to add more
TARGET_* ifdefs to common files...
> diff --git a/target-arm/machine.c b/target-arm/machine.c
> index 03a73d9..813909e 100644
> --- a/target-arm/machine.c
> +++ b/target-arm/machine.c
> @@ -5,6 +5,7 @@
> #include "sysemu/kvm.h"
> #include "kvm_arm.h"
> #include "internals.h"
> +#include "qmp-commands.h"
>
> static bool vfp_needed(void *opaque)
> {
> @@ -345,3 +346,8 @@ const char *gicv3_class_name(void)
>
> exit(1);
> }
> +
> +GICCapabilityList *qmp_query_gic_capabilities(Error **errp)
> +{
> + return NULL;
> +}
Why is this here? machine.c is for migration code.
thanks
-- PMM
[Qemu-devel] [PATCH v4 3/3] arm: implement query-gic-capabilities, Peter Xu, 2016/03/08
Re: [Qemu-devel] [PATCH v4 0/3] ARM: add query-gic-capabilities SMP command, Peter Maydell, 2016/03/16