[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hmp: add PC information for ARM vCPUs
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] hmp: add PC information for ARM vCPUs |
Date: |
Wed, 22 Feb 2017 17:26:42 +0000 |
On 22 February 2017 at 16:25, Alex Bennée <address@hidden> wrote:
> Signed-off-by: Alex Bennée <address@hidden>
> ---
> cpus.c | 6 ++++++
> hmp.c | 3 +++
> qapi-schema.json | 14 +++++++++++++-
> 3 files changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/cpus.c b/cpus.c
> index 559a0805bc..dc8dbfb0f0 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1869,6 +1869,9 @@ CpuInfoList *qmp_query_cpus(Error **errp)
> #elif defined(TARGET_TRICORE)
> TriCoreCPU *tricore_cpu = TRICORE_CPU(cpu);
> CPUTriCoreState *env = &tricore_cpu->env;
> +#elif defined(TARGET_AARCH64)
> + ARMCPU *arm_cpu = ARM_CPU(cpu);
> + CPUARMState *env = &arm_cpu->env;
> #endif
>
> cpu_synchronize_state(cpu);
> @@ -1896,6 +1899,9 @@ CpuInfoList *qmp_query_cpus(Error **errp)
> #elif defined(TARGET_TRICORE)
> info->value->arch = CPU_INFO_ARCH_TRICORE;
> info->value->u.tricore.PC = env->PC;
> +#elif defined(TARGET_AARCH64)
> + info->value->arch = CPU_INFO_ARCH_ARM;
> + info->value->u.arm.pc = env->pc;
> #else
> info->value->arch = CPU_INFO_ARCH_OTHER;
> #endif
My standard reaction when I see patches adding another
arm to a target-ifdef ladder like this is to ask whether
we can refactor this so that the target-specific
code lives in target/$ARCH instead...
thanks
-- PMM