From: Paolo Bonzini <pbonzini@redhat.com>
To: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 1/3] target/arm: Use CONFIG_SEMIHOSTING instead of TCG for semihosting
Date: Thu, 4 May 2023 09:33:13 +0200 [thread overview]
Message-ID: <3f8ed21a-6c05-e7a4-ab9a-c8f6ca041013@redhat.com> (raw)
In-Reply-To: <20230503193833.29047-2-farosas@suse.de>
On 5/3/23 21:38, Fabiano Rosas wrote:
> When building --without-default-devices, the semihosting code will not
> be available, so check the proper config.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
for this change; however, there are two more related issues:
1) you still want to leave out the code if !TCG, because KVM is not able
to exit to userspace on semihosting calls as far as I understand
2) I am not sure why CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y appears in
config/targets/{arm,riscv32,riscv64}-softmmu/default.mak.
Putting things together you also need something like
diff --git a/semihosting/Kconfig b/semihosting/Kconfig
index eaf3a20ef5b2..671020a33426 100644
--- a/semihosting/Kconfig
+++ b/semihosting/Kconfig
@@ -4,4 +4,5 @@ config SEMIHOSTING
config ARM_COMPATIBLE_SEMIHOSTING
bool
+ default y if (ARM && TCG) || RISCV32 || RISCV64
select SEMIHOSTING
diff --git a/configs/devices/arm-softmmu/default.mak b/configs/devices/arm-softmmu/default.mak
index 1b49a7830c7e..5e7a17d05bf8 100644
--- a/configs/devices/arm-softmmu/default.mak
+++ b/configs/devices/arm-softmmu/default.mak
@@ -41,5 +41,4 @@ CONFIG_FSL_IMX25=y
CONFIG_FSL_IMX7=y
CONFIG_FSL_IMX6UL=y
CONFIG_SEMIHOSTING=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
CONFIG_ALLWINNER_H3=y
diff --git a/configs/devices/riscv32-softmmu/default.mak b/configs/devices/riscv32-softmmu/default.mak
index d847bd5692ec..94a236c9c25b 100644
--- a/configs/devices/riscv32-softmmu/default.mak
+++ b/configs/devices/riscv32-softmmu/default.mak
@@ -3,8 +3,6 @@
# Uncomment the following lines to disable these optional devices:
#
#CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
# Boards:
#
diff --git a/configs/devices/riscv64-softmmu/default.mak b/configs/devices/riscv64-softmmu/default.mak
index bc69301fa4a6..3f6805944849 100644
--- a/configs/devices/riscv64-softmmu/default.mak
+++ b/configs/devices/riscv64-softmmu/default.mak
@@ -3,8 +3,6 @@
# Uncomment the following lines to disable these optional devices:
#
#CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
# Boards:
#
Paolo
> Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a KVM-only build")
> Signed-off-by: Fabiano Rosas<farosas@suse.de>
> ---
> target/arm/helper.c | 4 ++--
> target/arm/tcg/m_helper.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
next prev parent reply other threads:[~2023-05-04 7:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 19:38 [PATCH 0/3] target/arm: disable-tcg and without-default-devices fixes Fabiano Rosas
2023-05-03 19:38 ` [PATCH 1/3] target/arm: Use CONFIG_SEMIHOSTING instead of TCG for semihosting Fabiano Rosas
2023-05-04 7:33 ` Paolo Bonzini [this message]
2023-05-04 8:58 ` Peter Maydell
2023-05-04 12:45 ` Paolo Bonzini
2023-05-04 13:01 ` Fabiano Rosas
2023-05-05 8:18 ` Paolo Bonzini
2023-05-04 12:32 ` Alex Bennée
2023-05-03 19:38 ` [PATCH 2/3] target/arm: Add CONFIG_ARM_V7M back to default.mak Fabiano Rosas
2023-05-04 7:21 ` Paolo Bonzini
2023-05-03 19:38 ` [PATCH 3/3] tests/qtest: Don't run cdrom tests if no accelerator is present Fabiano Rosas
2023-05-04 7:22 ` Paolo Bonzini
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=3f8ed21a-6c05-e7a4-ab9a-c8f6ca041013@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=farosas@suse.de \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).