Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp300865rdb; Sun, 14 Jan 2024 18:39:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu9VEwBg5d702NanqXSg9BSBCLCL9sc76XPMJdTOMIx5XOCetLp7cIqbEHN9yy2V0CIQxL X-Received: by 2002:a05:6358:731c:b0:175:5f:7976 with SMTP id d28-20020a056358731c00b00175005f7976mr5528074rwg.24.1705286340743; Sun, 14 Jan 2024 18:39:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705286340; cv=none; d=google.com; s=arc-20160816; b=wrD2uey3VTjgCTA/RKySS+QtXVHU8MXtpQ77q1ZaLScRRTy8Ivgz4RaJydDLRFxETJ WuLADSPkMyw9iZ103icHeBgNUmZV9IgkDyz70IFqGFsfIXu7WrD78ZyNAc5ZKbT3ub9f gJwuQrSM3NtSDBprMlHP6t0b3Nts/iqWBUA3dNBXjYkX6/uIylSBwB6utmjNYbuKlN9w bVYqq+U9MHUXaEUjL2YFjypGsuh5s+RdWaCySWi1sJ8yeCD4CBeeVr0qpWAJjFDyAgZb avak46QJKBgiiO0UD1C6TZ4Md0oipiIaPwCzR82MimiyyhD0c5QOPE+vRe8b+bOQ5SDO v+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=sp0cDtoYBXFSyeoKR1ttkzmASwj02Q4AD67oZUkHwXc=; fh=QDaPqFiq65fjYdoeAlQYl1W2/SMiE91Fhes8EQYvu48=; b=zf6p1+X4Dy495blDVftl7SlnPFtLL7jPiasduXNgc7ylb36MunMPdVOpbxTsX8Wdrh 9C53a/r5Zk071RdQLSMnTHwvHBt0nyZdM9HoilKaJR1V67Zqbu6H0/tgCsYMW7KVYkiG HtMgUQxYuDJSNE2p81dN4KFFtCtvalhw9vg+TTdPTXHq81b989ygNkfiDec0yTe9BHsB hbeJcaC0t0xIhmmv8SvsXC1jY8x/vzFu5D5qHgO3AWNYE04oqwK9jh2it3zJ1VJdYmvt NktWELRJuJTIH7E0RJfmFKh6DxA1W1k9zaJI/31nyAockyqsNDEoDQxLjnX+KIKvtcnl /MvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XZRgQXP5; spf=pass (google.com: domain of linux-kernel+bounces-25595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q15-20020a65684f000000b005cdf488ba0asi8014404pgt.746.2024.01.14.18.39.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 18:39:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XZRgQXP5; spf=pass (google.com: domain of linux-kernel+bounces-25595-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0852328159D for ; Mon, 15 Jan 2024 02:39:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99EB417F6; Mon, 15 Jan 2024 02:38:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="XZRgQXP5" Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ED84628 for ; Mon, 15 Jan 2024 02:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1705286326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sp0cDtoYBXFSyeoKR1ttkzmASwj02Q4AD67oZUkHwXc=; b=XZRgQXP5sE2No4rkATbsAoJnuqqsqEbYQa0Zg4rPYii5zZrAPp4V8gKmgcgwHsWtdMy5zy dXUBdFoRzitSlO8gXIEgJYBWS+BnUsFt2g8xCszuVU+q3UQHCd3Sr0I7pi+i+z3cvTFKqO CCavEgfv5nOnxO31o6SUEKCxQU47X2Q= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: Re: [PATCH v3 2/3] arm64: mm: HVO: support BBM of vmemmap pgtable safely X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20240113094436.2506396-3-sunnanyong@huawei.com> Date: Mon, 15 Jan 2024 10:38:07 +0800 Cc: Catalin Marinas , Will Deacon , Mike Kravetz , akpm@linux-foundation.org, anshuman.khandual@arm.com, willy@infradead.org, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Transfer-Encoding: 7bit Message-Id: References: <20240113094436.2506396-1-sunnanyong@huawei.com> <20240113094436.2506396-3-sunnanyong@huawei.com> To: Nanyong Sun X-Migadu-Flow: FLOW_OUT > On Jan 13, 2024, at 17:44, Nanyong Sun wrote: > > Implement vmemmap_update_pmd and vmemmap_update_pte on arm64 to do > BBM(break-before-make) logic when change the page table of vmemmap > address, they will under the init_mm.page_table_lock. > If a translation fault of vmemmap address concurrently happened after > pte/pmd cleared, vmemmap page fault handler will acquire the > init_mm.page_table_lock to wait for vmemmap update to complete, > by then the virtual address is valid again, so PF can return and > access can continue. > In other case, do the traditional kernel fault. > > Implement vmemmap_flush_tlb_all/range on arm64 with nothing > to do because tlb already flushed in every single BBM. > > Signed-off-by: Nanyong Sun Reviewed-by: Muchun Song Thanks.