[PATCH 0/3] arm: Avoid asserting in cpu_address_space_init()

Peter Maydell posted 3 patches 4 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210816135842.25302-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Andrew Baumann <Andrew.Baumann@microsoft.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
hw/arm/raspi.c   |  2 +-
hw/arm/virt.c    |  5 -----
target/arm/cpu.c | 23 +++++++++++++++++++++++
3 files changed, 24 insertions(+), 6 deletions(-)
[PATCH 0/3] arm: Avoid asserting in cpu_address_space_init()
Posted by Peter Maydell 4 years, 5 months ago
KVM can't support more than one address space per CPU; if you try to
create more than one then cpu_address_space_init() will assert.

The Arm CPU realize function wasn't checking for the combination of
KVM and various features that might need multiple address spaces, so
it would just blunder on and hit the assertion failure for command
lines like:
 qemu-system-aarch64  -enable-kvm -display none -cpu max -machine raspi3b
 qemu-system-aarch64  -enable-kvm -display none -machine mps3-an524

This is https://gitlab.com/qemu-project/qemu/-/issues/528

This series adds the missing checks.  It also fixes the raspi board
code to not assert when CPU creation fails, and removes a
now-duplicate check from the virt board code.

thanks
-- PMM

Peter Maydell (3):
  raspi: Use error_fatal for SoC realize errors, not error_abort
  target/arm: Avoid assertion trying to use KVM and multiple ASes
  hw/arm/virt: Delete EL3 error checksnow provided in CPU realize

 hw/arm/raspi.c   |  2 +-
 hw/arm/virt.c    |  5 -----
 target/arm/cpu.c | 23 +++++++++++++++++++++++
 3 files changed, 24 insertions(+), 6 deletions(-)

-- 
2.20.1


Re: [PATCH 0/3] arm: Avoid asserting in cpu_address_space_init()
Posted by Richard Henderson 4 years, 5 months ago
On 8/16/21 3:58 AM, Peter Maydell wrote:
> Peter Maydell (3):
>    raspi: Use error_fatal for SoC realize errors, not error_abort
>    target/arm: Avoid assertion trying to use KVM and multiple ASes
>    hw/arm/virt: Delete EL3 error checksnow provided in CPU realize

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~