All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Leandro Lupori <leandro.lupori@eldorado.org.br>,
	danielhb413@gmail.com,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org,
	clg@kaod.org, pbonzini@redhat.com, david@gibson.dropbear.id.au
Subject: Re: [RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le
Date: Thu, 21 Apr 2022 10:43:25 +0100	[thread overview]
Message-ID: <87r15qvkhi.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA9HtPAydeC+C5fbCQCFxjhnV9_tbncRFsH51Mf2MeHQyw@mail.gmail.com>


Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 20 Apr 2022 at 20:52, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 4/20/22 12:42, Peter Maydell wrote:
>> > On Mon, 18 Apr 2022 at 20:19, Leandro Lupori
>> > <leandro.lupori@eldorado.org.br> wrote:
>> >>
>> >> PPC64 CPUs can change its endian dynamically, so semihosting code
>> >> must check its MSR at run time to determine if byte swapping is
>> >> needed.
>> >
>> > Arm CPUs also change endianness dynamically, so why is this
>> > change PPC-specific ?
>>
>> I'm reasonably certain that we simply don't test armbe or aarch64_be semihosting.  Leandro
>> found this because qemu-system-ppc64 defaults to BE and qemu-system-aarch64 defaults to LE.
>
> Right, so if there's an existing bug here on arm we should fix that,
> and that probably means that the abstraction split between
> "arch-specific thing" and "non-arch-specific code" is different
> from "PPC just overrides the entire swap function".

I think the helper function cpu_virtio_is_big_endian is really just a
proxy for the data endianess mode of the guest. Perhaps it could be
re-named and then used by the semihosting code?

-- 
Alex Bennée


  reply	other threads:[~2022-04-21  9:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 19:10 [RFC PATCH v3 0/5] Port PPC64/PowerNV MMU tests to QEMU Leandro Lupori
2022-04-18 19:10 ` [RFC PATCH v3 1/5] ppc64: Add semihosting support Leandro Lupori
2022-04-18 20:22   ` Cédric Le Goater
2022-04-20 17:54     ` Leandro Lupori
2022-04-20 18:18       ` Richard Henderson
2022-04-20 18:38         ` Leandro Lupori
2022-04-20 18:09     ` Leandro Lupori
2022-04-21  2:04       ` Nicholas Piggin
2022-04-21  6:21         ` Cédric Le Goater
2022-04-21  9:56           ` Nicholas Piggin
2022-04-28  3:56         ` Nicholas Piggin
2022-05-03 15:50           ` Fabiano Rosas
2022-05-10  9:41             ` Nicholas Piggin
2022-04-21  6:12       ` Cédric Le Goater
2022-04-18 23:33   ` Richard Henderson
2022-04-19  9:26   ` Peter Maydell
2022-04-20 18:20     ` Leandro Lupori
2022-04-20 19:24       ` Peter Maydell
2022-04-20 18:05   ` Peter Maydell
2022-04-20 18:30     ` Leandro Lupori
2022-04-18 19:10 ` [RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le Leandro Lupori
2022-04-18 23:36   ` Richard Henderson
2022-04-20 18:42     ` Leandro Lupori
2022-04-20 19:42   ` Peter Maydell
2022-04-20 19:52     ` Richard Henderson
2022-04-21  8:46       ` Alex Bennée
2022-04-21  9:13       ` Peter Maydell
2022-04-21  9:43         ` Alex Bennée [this message]
2022-04-21 10:01           ` Peter Maydell
2022-04-18 19:10 ` [RFC PATCH v3 3/5] tests/tcg/ppc64: Add basic softmmu test support Leandro Lupori
2022-04-18 20:27   ` Cédric Le Goater
2022-04-18 21:52     ` Daniel Henrique Barboza
2022-04-20 18:13       ` Leandro Lupori
2022-04-18 19:10 ` [RFC PATCH v3 4/5] tests/tcg/ppc64: Add MMU test sources Leandro Lupori
2022-04-18 19:11 ` [RFC PATCH v3 5/5] tests/tcg/ppc64: Build PowerNV and LE tests Leandro Lupori

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=87r15qvkhi.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=leandro.lupori@eldorado.org.br \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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.