<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p style="font-family:Tahoma;font-size:8pt;color:#CF022B;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
</p>
<br>
<div>
<div dir="auto">Hi Guenter,</div>
<div dir="auto">Thanks for this report. I'm afk this week, i"ll have a look at it in more détails next week.</div>
<div dir="auto">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.</div>
<div dir="auto">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 ?</div>
<div dir="auto">Thanks </div>
<div dir="auto">Christophe </div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">Envoyé à partir de <a href="https://aka.ms/AAb9ysg">
Outlook pour Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Linuxppc-dev <linuxppc-dev-bounces+christophe.leroy2=cs-soprasteria.com@lists.ozlabs.org> on behalf of Guenter Roeck <linux@roeck-us.net><br>
<b>Sent:</b> Tuesday, July 30, 2024 12:10:51 AM<br>
<b>To:</b> Christophe Leroy <christophe.leroy@csgroup.eu><br>
<b>Cc:</b> linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Nicholas Piggin <npiggin@gmail.com>; linux-mm@kvack.org <linux-mm@kvack.org>; Peter Xu <peterx@redhat.com>; Jason Gunthorpe <jgg@nvidia.com>; Andrew Morton <akpm@linux-foundation.org>;
linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org>; Oscar Salvador <osalvador@suse.de><br>
<b>Subject:</b> Re: [PATCH v7 16/23] powerpc/e500: Switch to 64 bits PGD on 85xx (32 bits)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
On Tue, Jul 02, 2024 at 03:51:28PM +0200, Christophe Leroy wrote:<br>
> At the time being when CONFIG_PTE_64BIT is selected, PTE entries are<br>
> 64 bits but PGD entries are still 32 bits.<br>
> <br>
> In order to allow leaf PMD entries, switch the PGD to 64 bits entries.<br>
> <br>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu><br>
<br>
With this patch in the mainline kernel, all my boot tests based on the<br>
mpc8544ds qemu emulation start crashing. Example crash log:<br>
<br>
kernel BUG at include/linux/pgtable.h:1599!<br>
Oops: Exception in kernel mode, sig: 5 [#1]<br>
BE PAGE_SIZE=4K MPC8544 DS<br>
Modules linked in:<br>
CPU: 0 UID: 0 PID: 1 Comm: swapper Tainted: G N 6.11.0-rc1 #1<br>
Tainted: [N]=TEST<br>
Hardware name: MPC8544DS e500v2 0x80210030 MPC8544 DS<br>
NIP: c01f51b8 LR: c01f6fec CTR: 00000000<br>
REGS: c4135c40 TRAP: 0700 Tainted: G N (6.11.0-rc1)<br>
MSR: 00029000 <CE,EE,ME> CR: 24228288 XER: 20000000<br>
GPR00: c01f6fc0 c4135d30 c415bf20 c762e3f0 c29c9318 c7624ff8 0000026b b5fc2ea1<br>
GPR08: 00000000 00000000 5a5a5000 b7f4dd55 44228282 00000000 c0005014 00000000<br>
GPR16: 00000000 00000000 00000001 00050003 24228282 24228282 00000000 00000095<br>
GPR24: c1375b30 c4135de8 c4135e48 00050003 c762e3a0 c762e3f0 bffffff1 c7676a08<br>
NIP [c01f51b8] pmd_write.constprop.0.isra.0+0x4/0x8<br>
LR [c01f6fec] follow_page_mask+0x150/0x17c<br>
Call Trace:<br>
[c4135d30] [c4135de8] 0xc4135de8 (unreliable)<br>
[c4135d40] [c01f6fc0] follow_page_mask+0x124/0x17c<br>
[c4135d70] [c01f7170] __get_user_pages+0x158/0x5d8<br>
[c4135dd0] [c01f7750] get_user_pages_remote+0x160/0x560<br>
[c4135e30] [c026838c] get_arg_page+0xb0/0x25c<br>
[c4135e70] [c0268dd4] copy_string_kernel+0xf0/0x200<br>
[c4135eb0] [c026a0e4] kernel_execve+0xbc/0x190<br>
[c4135ee0] [c0005108] kernel_init+0xf4/0x1d4<br>
[c4135f00] [c0016224] ret_from_kernel_user_thread+0x10/0x18<br>
<br>
This is with v6.11-rc1; the actually observed crash differs from test<br>
to test while running bisect.<br>
<br>
I can't just revert the patch because subsequent patches depend on it.<br>
Is this confirmed to work on real hardware ? If so, do you have a<br>
suggestion how I could continue to use the mpc8544ds emulation for<br>
testing, or is it just dead ?<br>
<br>
For reference, the configuration file is mpc85xx_defconfig.<br>
Bisect log is attached.<br>
<br>
Thanks,<br>
Guenter<br>
<br>
---<br>
# bad: [8400291e289ee6b2bf9779ff1c83a291501f017b] Linux 6.11-rc1<br>
# good: [2c9b3512402ed192d1f43f4531fb5da947e72bd0] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm<br>
git bisect start 'v6.11-rc1' '2c9b3512402e'<br>
# bad: [6dc2e98d5f1de162d1777aee97e59d75d70d07c5] s390: Remove protvirt and kvm config guards for uv code<br>
git bisect bad 6dc2e98d5f1de162d1777aee97e59d75d70d07c5<br>
# bad: [30d77b7eef019fa4422980806e8b7cdc8674493e] mm/mglru: fix ineffective protection calculation<br>
git bisect bad 30d77b7eef019fa4422980806e8b7cdc8674493e<br>
# good: [c02525a33969000fa7b595b743deb4d79804916b] ftrace: unpoison ftrace_regs in ftrace_ops_list_func()<br>
git bisect good c02525a33969000fa7b595b743deb4d79804916b<br>
# 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()".<br>
git bisect good 8ef6fd0e9ea83a792ba53882ddc6e0d38ce0d636<br>
# good: [a898530eea3d0ba08c17a60865995a3bb468d1bc] powerpc/64e: split out nohash Book3E 64-bit code<br>
git bisect good a898530eea3d0ba08c17a60865995a3bb468d1bc<br>
# bad: [00f58104202c472e487f0866fbd38832523fd4f9] mm: fix khugepaged activation policy<br>
git bisect bad 00f58104202c472e487f0866fbd38832523fd4f9<br>
# good: [e081c14744f4a93514069e1af1a7273d5451b909] powerpc/e500: remove enc and ind fields from struct mmu_psize_def<br>
git bisect good e081c14744f4a93514069e1af1a7273d5451b909<br>
# bad: [57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8] powerpc/64s: use contiguous PMD/PUD instead of HUGEPD<br>
git bisect bad 57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8<br>
# bad: [276d5affbbaea4d369d1e5b9711cb2951037f6ee] powerpc/e500: don't pre-check write access on data TLB error<br>
git bisect bad 276d5affbbaea4d369d1e5b9711cb2951037f6ee<br>
# bad: [84319905ca5f3759c42082e20ed978c81f4dead0] powerpc/e500: encode hugepage size in PTE bits<br>
git bisect bad 84319905ca5f3759c42082e20ed978c81f4dead0<br>
# bad: [6b0e82791bd03b2326c7f7d8c1124c825742f2a4] powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)<br>
git bisect bad 6b0e82791bd03b2326c7f7d8c1124c825742f2a4<br>
# first bad commit: [6b0e82791bd03b2326c7f7d8c1124c825742f2a4] powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)<br>
</div>
</span></font></div>
</div>
<br>
<p style="font-family:Tahoma;font-size:9pt;color:#CF022B;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
C2 – Usage restreint<br>
</p>
</body>
</html>