semihosting: Restrict to TCG
v3 cover semihosting: Restrict to TCG
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(-)
Signature · 1 line
2.41.0
PATCH v3 1/5 target/m68k: Restrict semihosting to TCG
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).
--- target/m68k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/m68k/Kconfig +1 -1
@@ -1,3 +1,3 @@ config M68K bool - select SEMIHOSTING + imply SEMIHOSTING if TCG
Signature · 1 line
2.41.0
PATCH v3 2/5 target/xtensa: Restrict semihosting to TCG
In reply to 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).
--- target/xtensa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/xtensa/Kconfig +1 -1
@@ -1,3 +1,3 @@ config XTENSA bool - select SEMIHOSTING + imply SEMIHOSTING if TCG
Signature · 1 line
2.41.0
Re: [PATCH v3 2/5] target/xtensa: Restrict semihosting to TCG
Quoted 10 lines · Philippe Mathieu-Daudé
The semihosting feature depends on TCG (due to the
probe_accessAPI access). Although TCG is the single accelerator currently available for the xtensa target, use theKconfig"imply" directive which is more correct (if we were to support a different accel).Reported-by Anton Johansson <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/xtensa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Thanks. -- Max
PATCH v3 3/5 target/mips: Restrict semihosting to TCG
In reply to 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.
--- target/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/mips/Kconfig +1 -1
@@ -1,6 +1,6 @@ config MIPS bool - select SEMIHOSTING + imply SEMIHOSTING if TCG config MIPS64 bool
Signature · 1 line
2.41.0
PATCH v3 4/5 target/riscv: Restrict semihosting to TCG
In reply to 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.
--- target/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/Kconfig +2 -2
@@ -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
Signature · 1 line
2.41.0
Re: [PATCH v3 4/5] target/riscv: Restrict semihosting to TCG
Quoted 8 lines · Philippe Mathieu-Daudé
Semihosting currently uses the TCG
probe_accessAPI. To prepare for encoding the TCG dependency inKconfig, do not enable it unless TCG is available.Suggested-by Paolo Bonzini <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Anton Johansson <[email protected]>
Alistair
Quoted 24 lines
--- target/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/riscv/Kconfig +2
-3@@ -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
PATCH v3 5/5 semihosting: Restrict to TCG
In reply to Philippe Mathieu-DaudéSemihosting currently uses the TCG probe_access API. It is pointless to have it in the binary when TCG isn't.
--- semihosting/Kconfig | 1 + 1 file changed, 1 insertion(+)
semihosting/Kconfig +1 -0
@@ -1,6 +1,7 @@ config SEMIHOSTING bool + depends on TCG config ARM_COMPATIBLE_SEMIHOSTING bool
Signature · 1 line
2.41.0
Alex Bennée
AppliedQuoted 10 lines · Philippe Mathieu-Daudé
v3: Address Anton's comment
v2: Address Paolo's commentSemihosting currently uses the TCG
probe_accessAPI, 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.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro