From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796249615; b=y3ejqLVMLxay0C8RaIprin+MM+FJlhYdI+uuN783LuflU3Mp5twzNpPRTWXR0NWmfFdz N3AZzebMCF6vZdgUJU2qXfZBE6/oyQAbhGP34vJ2SWPRzEmyl5QggJBXzY5Nszy3uvfPa b7FC/KrgC7R8bQn2ENHWOag6q5sPBNil9vrsMwLydDg9ohAL2Yyz13tgD355zYomlcaio V+6iSOpVBIqZEXDCSCkPOdRKFmIAXmhmKps9xd576PkVvwxK1+JFEanEGP9yAa8BpOe1S 6m47FpwUIIjRiZZXbIJzZk59ByR3CxA9MwV9oWfWJvySy1ux5MJx4/ExH7E171Kyk6g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796249615; h=DMARC-Filter:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=bX6f3BeIeJkA8vVszeyUT4Fs2G778vyvSUv88mEPC8M=; b=Je+TYgmEHNP5RE0IX/etg6J3FhxdSKrg18RCb60ypLPH5gISRMmLA7b3SRUSYVZptVf5 KUFO9zGdEi5WrmiYTFRoKdzmvo2ZJdE27Gi2YmZV2i5VKABQhnTF5v2yWqaGAFndwAgZk iD7YwTl+K8hdp4HeqDsJJ/99zRJUFckG7yFi5jj3yAwoL7YKsLrbRkgY2WkuAu+ykMLcd g3SGOmHfb6k/jdt4OOuK4RmS6Up3o22dYvOmx2iLjdKMT3ZSHyCNAtSsqZ87niKlewC4b 3iK4PHv0jLioCx24jDWQXFFuzjOdk8mSWVwVD7eflmcwv85pjDcRX75shvUVcmz4+xQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=YCmEjYSs; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B447F606A32C for ; Wed, 2 Dec 2026 22:13:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B447F606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=YCmEjYSs Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C5C81570; Wed, 2 Dec 2026 14:13:25 -0800 (PST) Received: from e129823.arm.com (e129823.arm.com [10.2.213.3]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E31953F86F; Wed, 2 Dec 2026 14:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796249608; bh=uOYwpiypXlFoekf+bg1aJ7x7BNnBGsbjAsoc+93a9Bk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YCmEjYSsk2FLsDkDsdEMo9+8NVm+YvR/eD5IxrPg9XKcM9Jcj3EysxuS74D+Cxx4g 13N+29j9A7yW4Ls4NWMqKd0tN+bFHEmErofilz+P2oeB2961/7Vf2dmpNp9Ev9+ZVT X8V7DheptmGqarWKPOkf8tEL22sjeARpIuvyy8co= Date: Wed, 2 Dec 2026 22:13:19 +0000 From: Yeoreum Yun To: Dave Hansen Cc: Yeoreum Yun , "David Hildenbrand (Arm)" , sashiko-reviews@lists.linux.dev, Russell King , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Catalin Marinas , Will Deacon , Arnd Bergmann , Andrew Morton , Kairui Song , Qi Zheng , Shakeel Butt , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , Michal Hocko , Lorenzo Stoakes , Tianrui Zhao , Bibo Mao , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jonas Bonn , Stefan Kristiansson , Stafford Horne , linux-mm@kvack.org, kvm@vger.kernel.org, Sohil Mehta Subject: Re: [PATCH v4 12/20] x86/mm: Introduce helper for checking direct map 1G page support Message-ID: References: <20261201-dummy_ptxp3-v4-0-9dec1da6a49a@arm.com> <20261201-dummy_ptxp3-v4-12-9dec1da6a49a@arm.com> <36d2dc8f-0bba-40e3-9d69-d0d3feb9e77e@intel.com> <23c24c39-0fc9-4d56-a762-29fe3421552f@intel.com> X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23c24c39-0fc9-4d56-a762-29fe3421552f@intel.com> On Wed, Dec 02, 2026 at 02:01:33PM -0800, Dave Hansen wrote: > On 12/2/26 12:03, Yeoreum Yun wrote: > > + tail_end = min_t(unsigned long, end, start + PUD_SIZE); > > + nr_pages = min_t(unsigned long, PUD_SIZE >> PAGE_SHIFT, > > + cpa->numpages - cur_pages); > > + > > + tmp = populate_pmd(cpa, start, tail_end, nr_pages, pud, pgprot); > > My LLM generated that too. It's a bit overly complicated for my taste > and doesn't use pud_addr_end(). I'm also not sure about the double > min_t()'s. Once the tail_end is calculated, can't the nr_pages just be > derived from _that_? whatever, just quick describes out from brain to explain _concept_ to resolve. > > Does anyone *need* a fix for this? Can't it just be ignored for the > purposes of this set? > > Aside: It's insane that this is only used by efi. Well, The problem is as we use direct_gbpages_enabled(), the nogbpages options can affect this situation where sashiko complains. But if this is only used by efi, I don't think this makes practical problem since efi runtime doesn't seems to use more than 1GB memory... -- Sincerely, Yeoreum Yun