qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Andrew Baumann <Andrew.Baumann@microsoft.com>
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	[thread overview]
Message-ID: <25540908-760a-44db-50f5-b36c38bef2db@amsat.org> (raw)
In-Reply-To: <20210816135842.25302-3-peter.maydell@linaro.org>

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>


  reply	other threads:[~2021-08-16 15:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 13:58 [PATCH 0/3] arm: Avoid asserting in cpu_address_space_init() Peter Maydell
2021-08-16 13:58 ` [PATCH 1/3] raspi: Use error_fatal for SoC realize errors, not error_abort Peter Maydell
2021-08-16 15:10   ` Philippe Mathieu-Daudé
2021-08-16 13:58 ` [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multiple ASes Peter Maydell
2021-08-16 15:12   ` Philippe Mathieu-Daudé [this message]
2021-08-16 13:58 ` [PATCH 3/3] hw/arm/virt: Delete EL3 error checksnow provided in CPU realize Peter Maydell
2021-08-16 15:10   ` Philippe Mathieu-Daudé
2021-08-16 18:00 ` [PATCH 0/3] arm: Avoid asserting in cpu_address_space_init() Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25540908-760a-44db-50f5-b36c38bef2db@amsat.org \
    --to=f4bug@amsat.org \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).