[PATCH-for-8.2? v2 0/4] hw/arm/stm32xxx: Report error when incorrect CPU is used

Philippe Mathieu-Daudé posted 4 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231117071704.35040-1-philmd@linaro.org
Maintainers: Alistair Francis <alistair@alistair23.me>, Peter Maydell <peter.maydell@linaro.org>, Felipe Balbi <balbi@kernel.org>, Alexandre Iooss <erdnaxe@crans.org>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Laurent Vivier <laurent@vivier.eu>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>
include/hw/arm/stm32f100_soc.h |  4 ----
include/hw/arm/stm32f205_soc.h |  4 ----
include/hw/arm/stm32f405_soc.h |  4 ----
include/hw/boards.h            |  2 +-
hw/arm/netduino2.c             |  7 ++++++-
hw/arm/netduinoplus2.c         |  7 ++++++-
hw/arm/olimex-stm32-h405.c     |  8 ++++++--
hw/arm/stm32f100_soc.c         |  9 ++-------
hw/arm/stm32f205_soc.c         |  9 ++-------
hw/arm/stm32f405_soc.c         |  8 +-------
hw/arm/stm32vldiscovery.c      |  7 ++++++-
hw/hppa/machine.c              | 22 ++++++++++------------
hw/m68k/q800.c                 | 11 +++++------
13 files changed, 45 insertions(+), 57 deletions(-)
[PATCH-for-8.2? v2 0/4] hw/arm/stm32xxx: Report error when incorrect CPU is used
Posted by Philippe Mathieu-Daudé 1 year ago
Series fully reviewed.

Hi,

While reviewing this [*] series from Arnaud and Inès,
I realized STM32 based boards don't check the requested
CPU type is correct, and ignore it. Possibly confusing
users.
Since these simple boards code is used as template,
I took the opportunity to sanitize it a bit, using the
MachineClass::valid_cpu_types which seems simpler (to me)
for newcomers.

Patches are candidate for 8.2 but this is a long
standing issue, not a regression from 8.1.

Regards,

Phil.

[*] https://lore.kernel.org/qemu-devel/170003673257.14701.8139061802716120109-0@git.sr.ht/

Gavin Shan (1):
  hw/core/machine: Constify MachineClass::valid_cpu_types[]

Philippe Mathieu-Daudé (3):
  hw/arm/stm32f405: Report error when incorrect CPU is used
  hw/arm/stm32f205: Report error when incorrect CPU is used
  hw/arm/stm32f100: Report error when incorrect CPU is used

 include/hw/arm/stm32f100_soc.h |  4 ----
 include/hw/arm/stm32f205_soc.h |  4 ----
 include/hw/arm/stm32f405_soc.h |  4 ----
 include/hw/boards.h            |  2 +-
 hw/arm/netduino2.c             |  7 ++++++-
 hw/arm/netduinoplus2.c         |  7 ++++++-
 hw/arm/olimex-stm32-h405.c     |  8 ++++++--
 hw/arm/stm32f100_soc.c         |  9 ++-------
 hw/arm/stm32f205_soc.c         |  9 ++-------
 hw/arm/stm32f405_soc.c         |  8 +-------
 hw/arm/stm32vldiscovery.c      |  7 ++++++-
 hw/hppa/machine.c              | 22 ++++++++++------------
 hw/m68k/q800.c                 | 11 +++++------
 13 files changed, 45 insertions(+), 57 deletions(-)

-- 
2.41.0


Re: [PATCH-for-8.2? v2 0/4] hw/arm/stm32xxx: Report error when incorrect CPU is used
Posted by Peter Maydell 1 year ago
On Fri, 17 Nov 2023 at 07:17, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Series fully reviewed.
>
> Hi,
>
> While reviewing this [*] series from Arnaud and Inès,
> I realized STM32 based boards don't check the requested
> CPU type is correct, and ignore it. Possibly confusing
> users.
> Since these simple boards code is used as template,
> I took the opportunity to sanitize it a bit, using the
> MachineClass::valid_cpu_types which seems simpler (to me)
> for newcomers.
>
> Patches are candidate for 8.2 but this is a long
> standing issue, not a regression from 8.1.
>



Applied to target-arm.next, thanks.

-- PMM