qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/2] hmp: dump ids including socket-id, core-


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v2 1/2] hmp: dump ids including socket-id, core-id and so on for 'info registers'
Date: Wed, 26 Jul 2017 16:29:34 +0200

On Wed, 26 Jul 2017 02:18:36 -0400
Yi Wang <address@hidden> wrote:

> This patch add output of CPUs' socket-id, core-id, thread-id and
> apic-id for 'info registers', which can be used for querying other
> hmp commands.
> 
> Signed-off-by: Yi Wang <address@hidden>
> Signed-off-by: Yun Liu <address@hidden>
> ---
>  target/i386/helper.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/target/i386/helper.c b/target/i386/helper.c
> index f63eb3d..a52f300 100644
> --- a/target/i386/helper.c
> +++ b/target/i386/helper.c
> @@ -416,6 +416,14 @@ void x86_cpu_dump_state(CPUState *cs, FILE *f, 
> fprintf_function cpu_fprintf,
>      int eflags, i, nb;
>      char cc_op_name[32];
>      static const char *seg_name[6] = { "ES", "CS", "SS", "DS", "FS", "GS" };
> +    APICCommonState *s = APIC_COMMON(cpu->apic_state);
> +
> +    if (!s) {
> +        cpu_fprintf(f, "local apic state not available\n");
> +        return;
> +    }
drop this hunk

> +    cpu_fprintf(f, "(socket-id:%d core-id:%d thread-id:%d apic-id:%d)\n",
> +            cpu->socket_id, cpu->core_id, cpu->thread_id, s->id);
and print apic id only if cpu->apic_state is not NULL

>  
>      eflags = cpu_compute_eflags(env);
>  #ifdef TARGET_X86_64




reply via email to

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