* [PATCH v3 0/5] semihosting: Restrict to TCG
@ 2024-06-10 14:58 Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 1/5] target/m68k: Restrict semihosting " Philippe Mathieu-Daudé
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?=
v3: Address Anton's comment
v2: Address Paolo's comment
Semihosting currently uses the TCG probe_access API,
so it is pointless to have it in the binary when TCG
isn't.
It could be implemented for other accelerators, but
work need to be done. Meanwhile, do not enable it
unless TCG is available.
Philippe Mathieu-Daudé (5):
target/m68k: Restrict semihosting to TCG
target/xtensa: Restrict semihosting to TCG
target/mips: Restrict semihosting to TCG
target/riscv: Restrict semihosting to TCG
semihosting: Restrict to TCG
semihosting/Kconfig | 1 +
target/m68k/Kconfig | 2 +-
target/mips/Kconfig | 2 +-
target/riscv/Kconfig | 4 ++--
target/xtensa/Kconfig | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/5] target/m68k: Restrict semihosting to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
@ 2024-06-10 14:58 ` Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 2/5] target/xtensa: " Philippe Mathieu-Daudé
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe Mathieu-Daudé
The semihosting feature depends on TCG (due to the probe_access
API access). Although TCG is the single accelerator currently
available for the m68k target, use the Kconfig "imply" directive
which is more correct (if we were to support a different accel).
Reported-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/m68k/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
index 9eae71486f..23aae24ebe 100644
--- a/target/m68k/Kconfig
+++ b/target/m68k/Kconfig
@@ -1,3 +1,3 @@
config M68K
bool
- select SEMIHOSTING
+ imply SEMIHOSTING if TCG
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/5] target/xtensa: Restrict semihosting to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 1/5] target/m68k: Restrict semihosting " Philippe Mathieu-Daudé
@ 2024-06-10 14:58 ` Philippe Mathieu-Daudé
2024-06-10 18:27 ` Max Filippov
2024-06-10 14:58 ` [PATCH v3 3/5] target/mips: " Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe Mathieu-Daudé
The semihosting feature depends on TCG (due to the probe_access
API access). Although TCG is the single accelerator currently
available for the xtensa target, use the Kconfig "imply" directive
which is more correct (if we were to support a different accel).
Reported-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/xtensa/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
index 5e46049262..e8c2598c4d 100644
--- a/target/xtensa/Kconfig
+++ b/target/xtensa/Kconfig
@@ -1,3 +1,3 @@
config XTENSA
bool
- select SEMIHOSTING
+ imply SEMIHOSTING if TCG
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/5] target/mips: Restrict semihosting to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 1/5] target/m68k: Restrict semihosting " Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 2/5] target/xtensa: " Philippe Mathieu-Daudé
@ 2024-06-10 14:58 ` Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 4/5] target/riscv: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API. To prepare for
encoding the TCG dependency in Kconfig, do not enable it unless TCG
is available.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
---
target/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/mips/Kconfig b/target/mips/Kconfig
index eb19c94c7d..876048b150 100644
--- a/target/mips/Kconfig
+++ b/target/mips/Kconfig
@@ -1,6 +1,6 @@
config MIPS
bool
- select SEMIHOSTING
+ imply SEMIHOSTING if TCG
config MIPS64
bool
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/5] target/riscv: Restrict semihosting to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2024-06-10 14:58 ` [PATCH v3 3/5] target/mips: " Philippe Mathieu-Daudé
@ 2024-06-10 14:58 ` Philippe Mathieu-Daudé
2024-06-11 0:17 ` Alistair Francis
2024-06-10 14:58 ` [PATCH v3 5/5] semihosting: Restrict " Philippe Mathieu-Daudé
2024-06-11 10:07 ` [PATCH v3 0/5] " Alex Bennée
5 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API. To prepare for
encoding the TCG dependency in Kconfig, do not enable it unless TCG
is available.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
---
target/riscv/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
index 5f30df22f2..c332616d36 100644
--- a/target/riscv/Kconfig
+++ b/target/riscv/Kconfig
@@ -1,9 +1,9 @@
config RISCV32
bool
- select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
+ imply ARM_COMPATIBLE_SEMIHOSTING if TCG
select DEVICE_TREE # needed by boot.c
config RISCV64
bool
- select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
+ imply ARM_COMPATIBLE_SEMIHOSTING if TCG
select DEVICE_TREE # needed by boot.c
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 5/5] semihosting: Restrict to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2024-06-10 14:58 ` [PATCH v3 4/5] target/riscv: " Philippe Mathieu-Daudé
@ 2024-06-10 14:58 ` Philippe Mathieu-Daudé
2024-06-11 10:07 ` [PATCH v3 0/5] " Alex Bennée
5 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-10 14:58 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-riscv, Paolo Bonzini, Alex Bennée, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier,
Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API.
It is pointless to have it in the binary when TCG isn't.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
semihosting/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/semihosting/Kconfig b/semihosting/Kconfig
index eaf3a20ef5..fbe6ac87f9 100644
--- a/semihosting/Kconfig
+++ b/semihosting/Kconfig
@@ -1,6 +1,7 @@
config SEMIHOSTING
bool
+ depends on TCG
config ARM_COMPATIBLE_SEMIHOSTING
bool
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/5] target/xtensa: Restrict semihosting to TCG
2024-06-10 14:58 ` [PATCH v3 2/5] target/xtensa: " Philippe Mathieu-Daudé
@ 2024-06-10 18:27 ` Max Filippov
0 siblings, 0 replies; 9+ messages in thread
From: Max Filippov @ 2024-06-10 18:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, qemu-riscv, Paolo Bonzini, Alex Bennée,
Anton Johansson, Richard Henderson, Laurent Vivier
On Mon, Jun 10, 2024 at 04:58:04PM +0200, Philippe Mathieu-Daudé wrote:
> The semihosting feature depends on TCG (due to the probe_access
> API access). Although TCG is the single accelerator currently
> available for the xtensa target, use the Kconfig "imply" directive
> which is more correct (if we were to support a different accel).
>
> Reported-by: Anton Johansson <anjo@rev.ng>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/xtensa/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 4/5] target/riscv: Restrict semihosting to TCG
2024-06-10 14:58 ` [PATCH v3 4/5] target/riscv: " Philippe Mathieu-Daudé
@ 2024-06-11 0:17 ` Alistair Francis
0 siblings, 0 replies; 9+ messages in thread
From: Alistair Francis @ 2024-06-11 0:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, qemu-riscv, Paolo Bonzini, Alex Bennée,
Anton Johansson, Richard Henderson, Max Filippov, Laurent Vivier
On Tue, Jun 11, 2024 at 12:59 AM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> Semihosting currently uses the TCG probe_access API. To prepare for
> encoding the TCG dependency in Kconfig, do not enable it unless TCG
> is available.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Anton Johansson <anjo@rev.ng>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/Kconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> index 5f30df22f2..c332616d36 100644
> --- a/target/riscv/Kconfig
> +++ b/target/riscv/Kconfig
> @@ -1,9 +1,9 @@
> config RISCV32
> bool
> - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
> + imply ARM_COMPATIBLE_SEMIHOSTING if TCG
> select DEVICE_TREE # needed by boot.c
>
> config RISCV64
> bool
> - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
> + imply ARM_COMPATIBLE_SEMIHOSTING if TCG
> select DEVICE_TREE # needed by boot.c
> --
> 2.41.0
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/5] semihosting: Restrict to TCG
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2024-06-10 14:58 ` [PATCH v3 5/5] semihosting: Restrict " Philippe Mathieu-Daudé
@ 2024-06-11 10:07 ` Alex Bennée
5 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2024-06-11 10:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, qemu-riscv, Paolo Bonzini, Anton Johansson,
Richard Henderson, Max Filippov, Laurent Vivier
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> v3: Address Anton's comment
> v2: Address Paolo's comment
>
> Semihosting currently uses the TCG probe_access API,
> so it is pointless to have it in the binary when TCG
> isn't.
>
> It could be implemented for other accelerators, but
> work need to be done. Meanwhile, do not enable it
> unless TCG is available.
Queued to semihosting/next, thanks.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-06-11 10:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10 14:58 [PATCH v3 0/5] semihosting: Restrict to TCG Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 1/5] target/m68k: Restrict semihosting " Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 2/5] target/xtensa: " Philippe Mathieu-Daudé
2024-06-10 18:27 ` Max Filippov
2024-06-10 14:58 ` [PATCH v3 3/5] target/mips: " Philippe Mathieu-Daudé
2024-06-10 14:58 ` [PATCH v3 4/5] target/riscv: " Philippe Mathieu-Daudé
2024-06-11 0:17 ` Alistair Francis
2024-06-10 14:58 ` [PATCH v3 5/5] semihosting: Restrict " Philippe Mathieu-Daudé
2024-06-11 10:07 ` [PATCH v3 0/5] " Alex Bennée
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).