On 30/5/24 09:31, Paolo Bonzini wrote:
On Thu, May 30, 2024 at 9:22 AM Philippe Mathieu-Daudé
<phi...@linaro.org> wrote:

On 30/5/24 08:02, Paolo Bonzini wrote:
On Wed, May 29, 2024 at 5:56 PM Philippe Mathieu-Daudé
<phi...@linaro.org> wrote:
It is pointless to build semihosting when TCG is not available.

Why? I would have naively assumed that a suitable semihosting API
could be implemented by KVM. The justification (and thus the commit
message) needs to be different for each architecture if it's a matter
of instruction set or insufficient KVM userspace API.

I wasn't sure where semihosting could be used so asked on IRC and
Alex told me TCG only. Maybe the current implementation is TCG
only, and I can reword. It certainly need some refactor to work
on KVM, because currently semihosting end calling the TCG probe_access
API, which I'm trying to restrict to TCG in order to ease linking
multiple libtcg for the single binary (see
https://lore.kernel.org/qemu-devel/20240529155918.6221-1-phi...@linaro.org/).

Ok, that goes in the commit message though.

"Semihosting currently uses the TCG probe_access API. It is pointless
to have it in the binary when TCG isn't".

and in the first two patches:

"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".

But then, "select FOO if TCG" mean that it can be compiled out; so
perhaps "imply SEMIHOSTING if TCG" is better? Same for RISC-V's
"select ARM_COMPATIBLE_SEMIHOSTING if TCG".

You are right. Thanks for reminding me Kconfig "imply" :)

Regards,

Phil.

Reply via email to