[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le
From: |
Peter Maydell |
Subject: |
Re: [RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le |
Date: |
Thu, 21 Apr 2022 11:01:57 +0100 |
On Thu, 21 Apr 2022 at 10:44, Alex Bennée <alex.bennee@linaro.org> wrote:
> 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?
We specifically named and documented that as "don't use this unless
you're the silly legacy virtio devices":
/**
* @virtio_is_big_endian: Callback to return %true if a CPU which supports
* runtime configurable endianness is currently big-endian.
* Non-configurable CPUs can use the default implementation of this method.
* This method should not be used by any callers other than the pre-1.0
* virtio devices.
*/
I think you're correct that it is also the right thing for semihosting,
but we should be a bit careful with the naming and commenting so we
can retain the "this is the wrong thing for most situations and
definitely not something to be calling in device model code" information
for developers and code reviewers.
-- PMM
- Re: [RFC PATCH v3 3/5] tests/tcg/ppc64: Add basic softmmu test support, (continued)
[RFC PATCH v3 2/5] ppc64: Fix semihosting on ppc64le, Leandro Lupori, 2022/04/18
[RFC PATCH v3 5/5] tests/tcg/ppc64: Build PowerNV and LE tests, Leandro Lupori, 2022/04/18