[PATCH v7 16/23] powerpc/e500: Switch to 64 bits PGD on 85xx (32 bits)
LEROY Christophe
christophe.leroy2 at cs-soprasteria.com
Thu Aug 1 01:36:26 AEST 2024
Hi Guenter,
Thanks for this report. I'm afk this week, i"ll have a look at it in more détails next week.
But to be sûre, does that Oops match the bisected commit ? Because pmd_leaf() for e500 doesn't exist yet so pmd_write() shouldnt be called.
I did validate all my changes with mpc8544 on qemu when i implemented this séries, using map_hugetlb mm selftest. What test tool are you using ?
Thanks
Christophe
Envoyé à partir de Outlook pour Android<https://aka.ms/AAb9ysg>
________________________________
From: Linuxppc-dev <linuxppc-dev-bounces+christophe.leroy2=cs-soprasteria.com at lists.ozlabs.org> on behalf of Guenter Roeck <linux at roeck-us.net>
Sent: Tuesday, July 30, 2024 12:10:51 AM
To: Christophe Leroy <christophe.leroy at csgroup.eu>
Cc: linux-kernel at vger.kernel.org <linux-kernel at vger.kernel.org>; Nicholas Piggin <npiggin at gmail.com>; linux-mm at kvack.org <linux-mm at kvack.org>; Peter Xu <peterx at redhat.com>; Jason Gunthorpe <jgg at nvidia.com>; Andrew Morton <akpm at linux-foundation.org>; linuxppc-dev at lists.ozlabs.org <linuxppc-dev at lists.ozlabs.org>; Oscar Salvador <osalvador at suse.de>
Subject: Re: [PATCH v7 16/23] powerpc/e500: Switch to 64 bits PGD on 85xx (32 bits)
Hi,
On Tue, Jul 02, 2024 at 03:51:28PM +0200, Christophe Leroy wrote:
> At the time being when CONFIG_PTE_64BIT is selected, PTE entries are
> 64 bits but PGD entries are still 32 bits.
>
> In order to allow leaf PMD entries, switch the PGD to 64 bits entries.
>
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
With this patch in the mainline kernel, all my boot tests based on the
mpc8544ds qemu emulation start crashing. Example crash log:
kernel BUG at include/linux/pgtable.h:1599!
Oops: Exception in kernel mode, sig: 5 [#1]
BE PAGE_SIZE=4K MPC8544 DS
Modules linked in:
CPU: 0 UID: 0 PID: 1 Comm: swapper Tainted: G N 6.11.0-rc1 #1
Tainted: [N]=TEST
Hardware name: MPC8544DS e500v2 0x80210030 MPC8544 DS
NIP: c01f51b8 LR: c01f6fec CTR: 00000000
REGS: c4135c40 TRAP: 0700 Tainted: G N (6.11.0-rc1)
MSR: 00029000 <CE,EE,ME> CR: 24228288 XER: 20000000
GPR00: c01f6fc0 c4135d30 c415bf20 c762e3f0 c29c9318 c7624ff8 0000026b b5fc2ea1
GPR08: 00000000 00000000 5a5a5000 b7f4dd55 44228282 00000000 c0005014 00000000
GPR16: 00000000 00000000 00000001 00050003 24228282 24228282 00000000 00000095
GPR24: c1375b30 c4135de8 c4135e48 00050003 c762e3a0 c762e3f0 bffffff1 c7676a08
NIP [c01f51b8] pmd_write.constprop.0.isra.0+0x4/0x8
LR [c01f6fec] follow_page_mask+0x150/0x17c
Call Trace:
[c4135d30] [c4135de8] 0xc4135de8 (unreliable)
[c4135d40] [c01f6fc0] follow_page_mask+0x124/0x17c
[c4135d70] [c01f7170] __get_user_pages+0x158/0x5d8
[c4135dd0] [c01f7750] get_user_pages_remote+0x160/0x560
[c4135e30] [c026838c] get_arg_page+0xb0/0x25c
[c4135e70] [c0268dd4] copy_string_kernel+0xf0/0x200
[c4135eb0] [c026a0e4] kernel_execve+0xbc/0x190
[c4135ee0] [c0005108] kernel_init+0xf4/0x1d4
[c4135f00] [c0016224] ret_from_kernel_user_thread+0x10/0x18
This is with v6.11-rc1; the actually observed crash differs from test
to test while running bisect.
I can't just revert the patch because subsequent patches depend on it.
Is this confirmed to work on real hardware ? If so, do you have a
suggestion how I could continue to use the mpc8544ds emulation for
testing, or is it just dead ?
For reference, the configuration file is mpc85xx_defconfig.
Bisect log is attached.
Thanks,
Guenter
---
# bad: [8400291e289ee6b2bf9779ff1c83a291501f017b] Linux 6.11-rc1
# good: [2c9b3512402ed192d1f43f4531fb5da947e72bd0] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
git bisect start 'v6.11-rc1' '2c9b3512402e'
# bad: [6dc2e98d5f1de162d1777aee97e59d75d70d07c5] s390: Remove protvirt and kvm config guards for uv code
git bisect bad 6dc2e98d5f1de162d1777aee97e59d75d70d07c5
# bad: [30d77b7eef019fa4422980806e8b7cdc8674493e] mm/mglru: fix ineffective protection calculation
git bisect bad 30d77b7eef019fa4422980806e8b7cdc8674493e
# good: [c02525a33969000fa7b595b743deb4d79804916b] ftrace: unpoison ftrace_regs in ftrace_ops_list_func()
git bisect good c02525a33969000fa7b595b743deb4d79804916b
# good: [8ef6fd0e9ea83a792ba53882ddc6e0d38ce0d636] Merge branch 'mm-hotfixes-stable' into mm-stable to pick up "mm: fix crashes from deferred split racing folio migration", needed by "mm: migrate: split folio_migrate_mapping()".
git bisect good 8ef6fd0e9ea83a792ba53882ddc6e0d38ce0d636
# good: [a898530eea3d0ba08c17a60865995a3bb468d1bc] powerpc/64e: split out nohash Book3E 64-bit code
git bisect good a898530eea3d0ba08c17a60865995a3bb468d1bc
# bad: [00f58104202c472e487f0866fbd38832523fd4f9] mm: fix khugepaged activation policy
git bisect bad 00f58104202c472e487f0866fbd38832523fd4f9
# good: [e081c14744f4a93514069e1af1a7273d5451b909] powerpc/e500: remove enc and ind fields from struct mmu_psize_def
git bisect good e081c14744f4a93514069e1af1a7273d5451b909
# bad: [57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8] powerpc/64s: use contiguous PMD/PUD instead of HUGEPD
git bisect bad 57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8
# bad: [276d5affbbaea4d369d1e5b9711cb2951037f6ee] powerpc/e500: don't pre-check write access on data TLB error
git bisect bad 276d5affbbaea4d369d1e5b9711cb2951037f6ee
# bad: [84319905ca5f3759c42082e20ed978c81f4dead0] powerpc/e500: encode hugepage size in PTE bits
git bisect bad 84319905ca5f3759c42082e20ed978c81f4dead0
# bad: [6b0e82791bd03b2326c7f7d8c1124c825742f2a4] powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)
git bisect bad 6b0e82791bd03b2326c7f7d8c1124c825742f2a4
# first bad commit: [6b0e82791bd03b2326c7f7d8c1124c825742f2a4] powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)
C2 - Usage restreint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20240731/c50e2427/attachment-0001.htm>
More information about the Linuxppc-dev
mailing list