[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH v0 3/5] spapr: Implement CPUClass.get_arch_id(
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC PATCH v0 3/5] spapr: Implement CPUClass.get_arch_id() for PowerPC CPUs |
Date: |
Tue, 5 Jul 2016 14:58:08 +1000 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Tue, Jul 05, 2016 at 10:12:50AM +0530, Bharata B Rao wrote:
> Signed-off-by: Bharata B Rao <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Longer term we should probably change the field name to arch_id. In
theory we could have something like this on a platform that didn't do
device trees.
> ---
> target-ppc/translate_init.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 8f257fb..b810624 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -10357,6 +10357,13 @@ static gchar *ppc_gdb_arch_name(CPUState *cs)
> #endif
> }
>
> +static int64_t ppc_cpu_get_arch_id(CPUState *cs)
> +{
> + PowerPCCPU *cpu = POWERPC_CPU(cs);
> +
> + return cpu->cpu_dt_id;
> +}
> +
> static void ppc_cpu_class_init(ObjectClass *oc, void *data)
> {
> PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
> @@ -10409,6 +10416,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void
> *data)
> #ifndef CONFIG_USER_ONLY
> cc->virtio_is_big_endian = ppc_cpu_is_big_endian;
> #endif
> + cc->get_arch_id = ppc_cpu_get_arch_id;
>
> dc->fw_name = "PowerPC,UNKNOWN";
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [Qemu-ppc] [RFC PATCH v0 2/5] cpu: Optionally use arch_id instead of cpu_index in cpu vmstate_register(), (continued)
Re: [Qemu-ppc] [RFC PATCH v0 2/5] cpu: Optionally use arch_id instead of cpu_index in cpu vmstate_register(), Greg Kurz, 2016/07/05
[Qemu-ppc] [RFC PATCH v0 3/5] spapr: Implement CPUClass.get_arch_id() for PowerPC CPUs, Bharata B Rao, 2016/07/05
- Re: [Qemu-ppc] [RFC PATCH v0 3/5] spapr: Implement CPUClass.get_arch_id() for PowerPC CPUs,
David Gibson <=
[Qemu-ppc] [RFC PATCH v0 4/5] xics: Use arch_id instead of cpu_index in XICS code, Bharata B Rao, 2016/07/05
[Qemu-ppc] [RFC PATCH v0 5/5] spapr: Prefer arch_id over cpu_index, Bharata B Rao, 2016/07/05
Re: [Qemu-ppc] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are removed in random order, Greg Kurz, 2016/07/05