[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH for 2.11 1/5] qom: move CPUClass.tcg_initialize to
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-arm] [PATCH for 2.11 1/5] qom: move CPUClass.tcg_initialize to a global |
Date: |
Fri, 10 Nov 2017 18:23:45 -0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Nov 10, 2017 at 02:53:42PM -0500, Emilio G. Cota wrote:
> 55c3cee ("qom: Introduce CPUClass.tcg_initialize", 2017-10-24)
> introduces a per-CPUClass bool that we check so that the target CPU
> is initialized for TCG only once. This works well except when
> we end up creating more than one CPUClass, in which case we end
> up incorrectly initializing TCG more than once, i.e. once for
> each CPUClass.
>
> This can be replicated with:
> $ aarch64-softmmu/qemu-system-aarch64 -machine xlnx-zcu102 -smp 6 \
> -global driver=xlnx,,zynqmp,property=has_rpu,value=on
> In this case the class name of the "RPUs" is prefixed by "cortex-r5-",
> whereas the "regular" CPUs are prefixed by "cortex-a53-". This
> results in two CPUClass instances being created.
>
> Fix it by introducing a static variable, so that only the first
> target CPU being initialized will initialize the target-dependent
> part of TCG, regardless of CPUClass instances.
>
> Fixes: 55c3ceef61fcf06fc98ddc752b7cce788ce7680b
> Signed-off-by: Emilio G. Cota <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
--
Eduardo
- [Qemu-arm] [PATCH for 2.11 0/5] TCG/ARM fixes for 2.11, Emilio G. Cota, 2017/11/10
- [Qemu-arm] [PATCH for 2.11 3/5] xlnx-zcu102: Add an info message deprecating the EP108, Emilio G. Cota, 2017/11/10
- [Qemu-arm] [PATCH for 2.11 4/5] xlnx-zcu102: Specify the max number of CPUs for the EP108, Emilio G. Cota, 2017/11/10
- [Qemu-arm] [PATCH for 2.11 1/5] qom: move CPUClass.tcg_initialize to a global, Emilio G. Cota, 2017/11/10
- [Qemu-arm] [PATCH for 2.11 5/5] hw: add .min_cpus and .default_cpus fields to machine_class, Emilio G. Cota, 2017/11/10
- [Qemu-arm] [PATCH for 2.11 2/5] xlnx-zynqmp: Properly support the smp command line option, Emilio G. Cota, 2017/11/10
- Re: [Qemu-arm] [PATCH for 2.11 0/5] TCG/ARM fixes for 2.11, Peter Maydell, 2017/11/13