* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 22 February 2017 at 16:25, Alex Bennée <alex.ben...@linaro.org> wrote: > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > > --- > > 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...
It feels like that should be possible with PC; but then you get the weird outliers; x86 that adds in CS, but OK that could be wrapped up in a target function; and then SPARC that's got pc and npc just to be different. Dave > thanks > -- PMM > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK