From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EC0BC004D3 for ; Mon, 22 Oct 2018 10:00:14 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 700FB2064E for ; Mon, 22 Oct 2018 10:00:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 700FB2064E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42dsT73bW0zDrWV for ; Mon, 22 Oct 2018 21:00:11 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42drzF2fhJzDrYb for ; Mon, 22 Oct 2018 20:37:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix, from userid 1034) id 42drzF1v5wz9sDC; Mon, 22 Oct 2018 20:37:45 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: dd0e144a632bcf2b5a6f04e2628e32b16d499277 In-Reply-To: <20181013164815.8858-1-aneesh.kumar@linux.ibm.com> To: "Aneesh Kumar K.V" , npiggin@gmail.com, benh@kernel.crashing.org, paulus@samba.org, Christophe LEROY From: Michael Ellerman Subject: Re: powerpc/mm: Fix WARN_ON with THP NUMA migration Message-Id: <42drzF1v5wz9sDC@ozlabs.org> Date: Mon, 22 Oct 2018 20:37:44 +1100 (AEDT) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Aneesh Kumar K.V" , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, 2018-10-13 at 16:48:15 UTC, "Aneesh Kumar K.V" wrote: > WARNING: CPU: 12 PID: 4322 at /arch/powerpc/mm/pgtable-book3s64.c:76 set_pmd_at+0x4c/0x2b0 > Modules linked in: > CPU: 12 PID: 4322 Comm: qemu-system-ppc Tainted: G W 4.19.0-rc3-00758-g8f0c636b0542 #36 > NIP: c0000000000872fc LR: c000000000484eec CTR: 0000000000000000 > REGS: c000003fba876fe0 TRAP: 0700 Tainted: G W (4.19.0-rc3-00758-g8f0c636b0542) > MSR: 900000010282b033 CR: 24282884 XER: 00000000 > CFAR: c000000000484ee8 IRQMASK: 0 > GPR00: c000000000484eec c000003fba877268 c000000001f0ec00 c000003fbd229f80 > GPR04: 00007c8fe8e00000 c000003f864c5a38 860300853e0000c0 0000000000000080 > GPR08: 0000000080000000 0000000000000001 0401000000000080 0000000000000001 > GPR12: 0000000000002000 c000003fffff5400 c000003fce292000 00007c9024570000 > GPR16: 0000000000000000 0000000000ffffff 0000000000000001 c000000001885950 > GPR20: 0000000000000000 001ffffc0004807c 0000000000000008 c000000001f49d05 > GPR24: 00007c8fe8e00000 c0000000020f2468 ffffffffffffffff c000003fcd33b090 > GPR28: 00007c8fe8e00000 c000003fbd229f80 c000003f864c5a38 860300853e0000c0 > NIP [c0000000000872fc] set_pmd_at+0x4c/0x2b0 > LR [c000000000484eec] do_huge_pmd_numa_page+0xb1c/0xc20 > Call Trace: > [c000003fba877268] [c00000000045931c] mpol_misplaced+0x1bc/0x230 (unreliable) > [c000003fba8772c8] [c000000000484eec] do_huge_pmd_numa_page+0xb1c/0xc20 > [c000003fba877398] [c00000000040d344] __handle_mm_fault+0x5e4/0x2300 > [c000003fba8774d8] [c00000000040f400] handle_mm_fault+0x3a0/0x420 > [c000003fba877528] [c0000000003ff6f4] __get_user_pages+0x2e4/0x560 > [c000003fba877628] [c000000000400314] get_user_pages_unlocked+0x104/0x2a0 > [c000003fba8776c8] [c000000000118f44] __gfn_to_pfn_memslot+0x284/0x6a0 > [c000003fba877748] [c0000000001463a0] kvmppc_book3s_radix_page_fault+0x360/0x12d0 > [c000003fba877838] [c000000000142228] kvmppc_book3s_hv_page_fault+0x48/0x1300 > [c000003fba877988] [c00000000013dc08] kvmppc_vcpu_run_hv+0x1808/0x1b50 > [c000003fba877af8] [c000000000126b44] kvmppc_vcpu_run+0x34/0x50 > [c000003fba877b18] [c000000000123268] kvm_arch_vcpu_ioctl_run+0x288/0x2d0 > [c000003fba877b98] [c00000000011253c] kvm_vcpu_ioctl+0x1fc/0x8c0 > [c000003fba877d08] [c0000000004e9b24] do_vfs_ioctl+0xa44/0xae0 > [c000003fba877db8] [c0000000004e9c44] ksys_ioctl+0x84/0xf0 > [c000003fba877e08] [c0000000004e9cd8] sys_ioctl+0x28/0x80 > > We removed the pte_protnone check earlier with the understanding that we > mark the pte invalid before the set_pte/set_pmd usage. But the huge pmd > autonuma still use the set_pmd_at directly. This is ok because a protnone pte > won't have translation cache in TLB. > > Fixes: da7ad366b497 ("powerpc/mm/book3s: Update pmd_present to look at _PAGE_PRESENT bit") > Signed-off-by: Aneesh Kumar K.V Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/dd0e144a632bcf2b5a6f04e2628e32 cheers