[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multip
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multiple ASes |
Date: |
Mon, 16 Aug 2021 17:12:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/16/21 3:58 PM, Peter Maydell wrote:
> KVM cannot support multiple address spaces per CPU; if you try to
> create more than one then cpu_address_space_init() will assert.
>
> In the Arm CPU realize function, detect the configurations which
> would cause us to need more than one AS, and cleanly fail the
> realize rather than blundering on into the assertion. This
> turns this:
> $ qemu-system-aarch64 -enable-kvm -display none -cpu max -machine raspi3b
> qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init:
> Assertion `asidx == 0 || !kvm_enabled()' failed.
> Aborted
>
> into:
> $ qemu-system-aarch64 -enable-kvm -display none -machine raspi3b
> qemu-system-aarch64: Cannot enable KVM when guest CPU has EL3 enabled
>
> and this:
> $ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524
> qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init:
> Assertion `asidx == 0 || !kvm_enabled()' failed.
> Aborted
>
> into:
> $ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524
> qemu-system-aarch64: Cannot enable KVM when using an M-profile guest CPU
>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/528
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/cpu.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- [PATCH 0/3] arm: Avoid asserting in cpu_address_space_init(), Peter Maydell, 2021/08/16
- [PATCH 1/3] raspi: Use error_fatal for SoC realize errors, not error_abort, Peter Maydell, 2021/08/16
- [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multiple ASes, Peter Maydell, 2021/08/16
- Re: [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multiple ASes,
Philippe Mathieu-Daudé <=
- [PATCH 3/3] hw/arm/virt: Delete EL3 error checksnow provided in CPU realize, Peter Maydell, 2021/08/16
- Re: [PATCH 0/3] arm: Avoid asserting in cpu_address_space_init(), Richard Henderson, 2021/08/16