qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yogesh Vyas <yvyas1991@gmail.com>
To: Chinmay Rath <rathc@linux.ibm.com>,
	Danila Zhebryakov <d.zhebryakov@yandex.ru>,
	qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Laurent Vivier <laurent@vivier.eu>,
	Nicholas Piggin <npiggin@gmail.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	qemu-ppc@nongnu.org, Riku Voipio <riku.voipio@iki.fi>,
	Thomas Huth <thuth@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-s390x@nongnu.org
Subject: Re: [PATCH v4 0/4] Add support for PowerPC e500 little-endian pages
Date: Sun, 2 Nov 2025 21:50:00 +0530	[thread overview]
Message-ID: <2fd10834-cfb4-46f8-ad64-8a54b8a00ca0@gmail.com> (raw)
In-Reply-To: <d52da8d1-3d9c-46c4-99db-b22bd597db27@linux.ibm.com>

Hi Danila,

Could you please share steps (including links to images used) to test 
these patches.

Regards,
Yogesh Vyas

On 10/31/25 6:11 PM, Chinmay Rath wrote:
> 
> On 10/27/25 18:00, Danila Zhebryakov wrote:
>> These changes make powerpc booke206 mmu pass TLB_BSWAP flag for pages 
>> marked as LE, and also fixes all the issues this causes.
>>   - added TLB_BSWAP to non-MMIO flags
>>   - inserted additional check for LE page when bswap-ing instructions
>>   - removed assert for cross-page TLB_BSWAP accesses
>>   - added gdbstub fix to account for TLB_BSWAP of the currently 
>> running code
>>
>> BE- and LE- atomic operations (used by load-and-reserve and store- 
>> conditional instructions) were unified to support TLB_BSWAP
>>
>> Some of the fixes are based on what is done in https://github.com/ 
>> YetAnotherMod/qemu
>>
>> V2:
>>   - Removed usage of PAGE_USER bit for LE (comment on previous version)
>>   - Refactored MMU code so directly setting TLB_BSWAP is possible
>>   - moved translation LE page detect to occur 1 time per translation 
>> (comment on previous version)
>>   - Removed redundant assert in atomic_mmu_lookup (comment on previous 
>> version)
>>   - Added assert on cross-endian accesses (ideally, there should be an 
>> exception)
>>   - Changed atomic need_bswap handling (comment on previous version)
>>   - Rebased and fixed atomics
>>
>> V3
>>   - unfix assumed typo (if vs iff). Everything else unchanged
>>
>> V4
>>   - fix leftovers from BE/LE atomic op tables
>>   - fix uninitialized CPUTLBEntryFull full in mmu_common
>>
>> According to RM, unaligned accesses between LE and BE pages should 
>> cause an exception on e500.
>> However, (as I understand it) supporting this would require adding a 
>> new callback to TCGCPUOps, likely just for E500 or maybe a couple 
>> other CPUs doing this.
>> Such accesses are clearly not normal and usually don't occur in real 
>> applications, so I think just placing assert is OK here.
>>
>> Danila Zhebryakov (4):
>>    accel/tcg: Unify big- and little- endian atomic ops
>>    target/ppc: refactor MMU helpers
>>    target/ppc: Add support for LE pages on PowerPC booke206 mmu
>>    target/ppc: fix GDB stub to work correctly with LE pages
>>
>>   accel/tcg/atomic_common.c.inc       |  36 +--
>>   accel/tcg/atomic_template.h         | 326 ++++++++++------------------
>>   accel/tcg/cputlb.c                  |  29 ++-
>>   accel/tcg/tcg-runtime.h             |  48 +---
>>   accel/tcg/user-exec.c               |   2 +-
>>   include/accel/tcg/cpu-ldst-common.h |  51 ++---
>>   target/m68k/op_helper.c             |   4 +-
>>   target/ppc/gdbstub.c                |  17 +-
>>   target/ppc/internal.h               |   3 +-
>>   target/ppc/mmu-booke.c              |  67 +++---
>>   target/ppc/mmu-booke.h              |   2 +-
>>   target/ppc/mmu-hash32.c             |  30 +--
>>   target/ppc/mmu-hash32.h             |   3 +-
>>   target/ppc/mmu-hash64.c             |  14 +-
>>   target/ppc/mmu-hash64.h             |   2 +-
>>   target/ppc/mmu-radix64.c            |  20 +-
>>   target/ppc/mmu-radix64.h            |   2 +-
>>   target/ppc/mmu_common.c             |  75 ++++---
>>   target/ppc/mmu_helper.c             |  15 +-
>>   target/ppc/translate.c              |  42 +++-
>>   target/s390x/tcg/mem_helper.c       |   6 +-
>>   tcg/tcg-op-ldst.c                   |  51 ++---
>>   22 files changed, 374 insertions(+), 471 deletions(-)
>>
> Hey Danila,
> 
> This series is failing on QEMU_CI. You can check it here :
> https://gitlab.com/rathc/qemu/-/pipelines/2131344109
> 
> <https://gitlab.com/rathc/qemu/-/pipelines/2131344109>
> 
> Here are some logs for quick reference :
> 
> |configuring with: '../configure' '--enable-werror' '--disable-docs' '-- 
> cross-prefix=powerpc64le-linux-gnu-' '--disable-tools' '--enable-kvm' 
> '--disable-tcg' '--without-default-devices'
> ...
> |||
> 
> |[1690/1838] Linking target qemu-system-ppc64|
> |
> ||
> FAILED: qemu-system-ppc64
> ||
> powerpc64le-linux-gnu-gcc -m64 -mlittle-endian @qemu-system-ppc64.rsp
> ||
> /usr/lib/gcc-cross/powerpc64le-linux-gnu/14/../../../../powerpc64le- 
> linux-gnu/bin/ld: libqemu-ppc64-softmmu.a.p/target_ppc_gdbstub.c.o: in 
> function `ppc_maybe_bswap_register':
> ||
> /builds/rathc/qemu/build/../target/ppc/gdbstub.c:96:(.text+0xd0): 
> undefined reference to `probe_access_full_mmu'
> ||
> collect2: error: ld returned 1 exit status
> ||
> [1691/1838] Linking target qemu-system-ppc
> ||
> FAILED: qemu-system-ppc
> ||
> powerpc64le-linux-gnu-gcc -m64 -mlittle-endian @qemu-system-ppc.rsp
> ||
> /usr/lib/gcc-cross/powerpc64le-linux-gnu/14/../../../../powerpc64le- 
> linux-gnu/bin/ld: libqemu-ppc-softmmu.a.p/target_ppc_gdbstub.c.o: in 
> function `ppc_maybe_bswap_register':
> ||
> /builds/rathc/qemu/build/../target/ppc/gdbstub.c:96:(.text+0xd0): 
> undefined reference to `probe_access_full_mmu'
> ||
> collect2: error: ld returned 1 exit status
> ||
> [1692/1838] Generating pc-bios/edk2-arm-code.fd with a custom command 
> (wrapped by meson to capture output)
> ||
> ninja: build stopped: subcommand failed.
> ||make: *** [Makefile:168: run-ninja] Error 1
> |
> Thanks and regards,
> 
> Chinmay
> 
> 



      parent reply	other threads:[~2025-11-02 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 12:30 [PATCH v4 0/4] Add support for PowerPC e500 little-endian pages Danila Zhebryakov
2025-10-27 12:30 ` [PATCH v4 1/4] accel/tcg: Unify big- and little- endian atomic ops Danila Zhebryakov
2025-10-27 12:30 ` [PATCH v4 2/4] target/ppc: refactor MMU helpers Danila Zhebryakov
2025-10-27 12:30 ` [PATCH v4 3/4] target/ppc: Add support for LE pages on PowerPC booke206 mmu Danila Zhebryakov
2025-10-27 12:30 ` [PATCH v4 4/4] target/ppc: fix GDB stub to work correctly with LE pages Danila Zhebryakov
     [not found] ` <d52da8d1-3d9c-46c4-99db-b22bd597db27@linux.ibm.com>
2025-11-02 16:20   ` Yogesh Vyas [this message]

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=2fd10834-cfb4-46f8-ad64-8a54b8a00ca0@gmail.com \
    --to=yvyas1991@gmail.com \
    --cc=d.zhebryakov@yandex.ru \
    --cc=david@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=laurent@vivier.eu \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=richard.henderson@linaro.org \
    --cc=riku.voipio@iki.fi \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).