All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.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, 04 May 2023 10:01:12 -0300	[thread overview]
Message-ID: <875y98cktj.fsf@suse.de> (raw)
In-Reply-To: <CABgObfbBTUUAOmvKz9U2Esi3rmdYmbhw3uR5iouFYUwFGoG32Q@mail.gmail.com>

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il gio 4 mag 2023, 10:59 Peter Maydell <peter.maydell@linaro.org> ha
> scritto:
>
>> On Thu, 4 May 2023 at 08:33, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> >
>> > 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.
>>
>> I think the changes to the ifdeffery are conceptually
>> fine (only do semihosting if it was configured in), but
>> it sounds like there's a separate problem here.
>> Whether we need semihosting depends on the accelerator (ie
>> "is it TCG or not"), not on what set of devices we're building.
>> So the problem seems to me to be that --without-default-devices
>> is causing the semihosting code not to be built in.
>>
>> > 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.
>>
>> Because those are the architectures which have
>> "arm-compatible" semihosting ABIs ?
>>
>
> Yes but is there a reason to do it in configs/ where all the other symbols
> are boards, or was it just overlooked and a "default y" (as I suggested in
> the previous reply) or "imply" is better?

For arm it has been taken out of configs/ and moved into
target/arm/Kconfig:

...
# This config exists just so we can make SEMIHOSTING default when TCG
# is selected without also changing it for other architectures.
config ARM_SEMIHOSTING
    bool
    default y if TCG && ARM
    select ARM_COMPATIBLE_SEMIHOSTING

So I guess we'd need a similar change to what you suggested for ARM_V7M:

config ARM
    bool
    select ARM_V7M if TCG
    select ARM_COMPATIBLE_SEMIHOSTING if TCG

  reply	other threads:[~2023-05-04 13:01 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
2023-05-04  8:58     ` Peter Maydell
2023-05-04 12:45       ` Paolo Bonzini
2023-05-04 13:01         ` Fabiano Rosas [this message]
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=875y98cktj.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.