Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1128836rwd; Thu, 8 Jun 2023 12:35:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yy5He2/uCGNYYgMQQS0KmzHE3reYQuChWGRuPFxfRTMspJwohosKXB29ffOoq3vJno2zT X-Received: by 2002:a05:6a20:258f:b0:117:3c00:77ea with SMTP id k15-20020a056a20258f00b001173c0077eamr3857908pzd.0.1686252951355; Thu, 08 Jun 2023 12:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686252951; cv=none; d=google.com; s=arc-20160816; b=as0+KK9esv/IdXONciDP1dvjRXveBFhkS8cy1MnAU5TaX2X2rO1nl4JxwH0L4y9IXG utaI1A12bcxeH/FTHsjeC7Bt3rwjA8r4sv9X1P2Q3A/2yXGo0d/siUGysvUaMia86tlq oXY1J4vmx6xbbfDIKyvG01ilGhtEsT1OSaBzSY5gRmGjqW1qbJYsgQdVwxkDxrkWaTuJ J12Dai/Kgxnj1plPGQI0OqBSYLadU7V+lvzOs/r4xpebPc4kvW9gaZR7htPDcNyU1a0w Aimp1BqrgbgJHr4ThbZSM4HfswZ6zDOVc0I9nZeuePLDfYpkiWC6hXJ91FPReS9/rq5S IdLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=AaeZuUVBfmnJYKBnECwxHMg2ZqET9Q9+U5NUK8rUZ9F4q5LOazN1QZA2Ssmw9rYAwM TDOjY3BBbCSpkoYwxcGF5TqocxIcB6NZqPi0eDwQcIHU4A6XkaqzeIzV1g1iUXf+wn+f TJ1kNBV6QsJVlCVuxUKh56dQYrtIkN9Q+k/mTSrkjdDK9FnoR2KQo3mpD+Y3Xw3GnTfv NWaKNy3DiQ5agjDVMW6KSxwuX/1za0g3ZLdwaU1GS98PdFLeob8hc3ZNdH3+YCNoSExp /qNUZ7w4I2em0pF0epH4abxcsiPXgzEAakAkFSO/EcNQPh/sR87kD3hiynWyV3GezlTo 5lEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=5jRACtmO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l187-20020a6325c4000000b0053489a7b8e1si1436513pgl.198.2023.06.08.12.35.39; Thu, 08 Jun 2023 12:35:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=5jRACtmO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236837AbjFHTXP (ORCPT + 99 others); Thu, 8 Jun 2023 15:23:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjFHTXL (ORCPT ); Thu, 8 Jun 2023 15:23:11 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EE1F30FE for ; Thu, 8 Jun 2023 12:22:46 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-569386b7861so31293947b3.0 for ; Thu, 08 Jun 2023 12:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252164; x=1688844164; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=5jRACtmOYl24iPoTbIjNRpyUFAC/FI9lpuvtUNHnC43m7VYioQ/BjHL7bdRB1Sderj Ku/HQKtR0qPfeCfubIqZ/AIBxONFw9MhEvcLPL8cbaxLn3mTiR/nWL6P2PCLjm+BwcQW 0EgQz3QqN/pDsKtdmzyltGWnacSj5IwEptrUle8FLf/akecGFE+OR3UMPvCEsj1BvLU9 B+ORl75p95EI9Mde8VL9yv1b1t+G7YgfanAmLLFyt7bpvhgPlWiVhcJ7Ue5u8gtJ1wSb o7+vcjNZQIk2HsdRh5Pl//khJzNempIfA/Kf3RkDsGtD4+XKnKjXxiMtp0DlEfTwETu/ 3u+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252164; x=1688844164; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=RfQCK/jP5myon2RirKe5OBEfXyeae7ocfKDmNXL3f7bZONdBELRgep4KcYQedoJXxO blRuigHCMsq9ieLhszMFQaCAbx0cCmd02ZxwZgOLLA3Ihscit9JC2EvqGALzLfmJHMH2 E1c7kPyqyR+lZ7woc7wWHnZzNAYQHPpnyKpnw7HF9aJJ6GyDQUu1vGtD1JXYORgCz4CT j6MuCiipoXoYT4QBdVqbKWMM74TDLcVHtVBeVSyCHF5B6KhLSYbhYrGL1tEObiAUTXPL 6l8jYgr19nMECYqyXatwwSoa3WJy39hs3K1jMAfb7PZS2P3pX85N4VDU8r5M2fkuDfWN g76Q== X-Gm-Message-State: AC+VfDwvHXcl9JlNADc45xN5+exmFyRZurlcQAobmfU1ULBdDuLwbMxz K6MP3CQ/1n4ad2irjInhMh/1EA== X-Received: by 2002:a81:a08c:0:b0:569:ef9b:eda with SMTP id x134-20020a81a08c000000b00569ef9b0edamr823988ywg.10.1686252163900; Thu, 08 Jun 2023 12:22:43 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id n126-20020a817284000000b00561949f713fsm118018ywc.39.2023.06.08.12.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:22:43 -0700 (PDT) Date: Thu, 8 Jun 2023 12:22:39 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Peter Zijlstra , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Helge Deller , John David Anglin , "Aneesh Kumar K.V" , Michael Ellerman , Alexandre Ghiti , Palmer Dabbelt , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , Alexander Gordeev , John Paul Adrian Glaubitz , "David S. Miller" , Chris Zankel , Max Filippov , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 11/23] powerpc: kvmppc_unmap_free_pmd() pte_offset_kernel() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kvmppc_unmap_free_pmd() use pte_offset_kernel(), like everywhere else in book3s_64_mmu_radix.c: instead of pte_offset_map(), which will come to need a pte_unmap() to balance it. But note that this is a more complex case than most: see those -EAGAINs in kvmppc_create_pte(), which is coping with kvmppc races beween page table and huge entry, of the kind which we are expecting to address in pte_offset_map() - this might want to be revisited in future. Signed-off-by: Hugh Dickins --- arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c index 461307b89c3a..572707858d65 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_radix.c +++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c @@ -509,7 +509,7 @@ static void kvmppc_unmap_free_pmd(struct kvm *kvm, pmd_t *pmd, bool full, } else { pte_t *pte; - pte = pte_offset_map(p, 0); + pte = pte_offset_kernel(p, 0); kvmppc_unmap_free_pte(kvm, pte, full, lpid); pmd_clear(p); } -- 2.35.3