From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3B742253F2D for ; Mon, 12 May 2025 23:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747092874; cv=none; b=JWSfLRuZaoh0og9+Xq7Trd7O5KH/5XwEOaS+1O0COMeXPaEc+bv4RReWaWE06tDn7A2bWzj5gjaANOtdVQ7A4fGpw1MCbT7g3TH2YkOQ3YGf7zVV+cuGqq+nJCRLYSyToY/Rg6CgmYkR/eUd3q+NSO+JD6vUQbaDd6arMMtXKQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747092874; c=relaxed/simple; bh=JqxefpVgbG/dpyt37x0zDOa/Tz5IhJH4/eDz5/Y21r8=; h=Date:To:From:Subject:Message-Id; b=D57MGkJ7A+KOkedowJykNhyD3EhToIz5bbCNqyDiiaapi8cH4Y//zvpv1kwjpB0eyUGRETzP5Y+5IilZypgkjdGSWWc0NJ/EW+A9hrWWewk6+JT9s9/Ejs1pVHEmqld41C0aHmry+OB8rcPqFI/bKp42cPUDaXaA+VhAzBZbumo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=y/mK+cM6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="y/mK+cM6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 955FCC4CEE7; Mon, 12 May 2025 23:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1747092873; bh=JqxefpVgbG/dpyt37x0zDOa/Tz5IhJH4/eDz5/Y21r8=; h=Date:To:From:Subject:From; b=y/mK+cM6iD0Duv8EFjJAfBGYsJbtdQVMebU00BYV97fHzYrHmPgTE9FNIWqwjB++l YvzZSF/ZA2o6HOXtHYnT/spBqBuEMZwLWk3NNkIyc0D7AaVcdwVO7jT+zSLqisV3v2 Vrk1rTLuGpEIGzeFp4YzFlpNttFMHiffWlwQvd6U= Date: Mon, 12 May 2025 16:34:33 -0700 To: mm-commits@vger.kernel.org,vbabka@suse.cz,tursulin@ursulin.net,tglx@linutronix.de,rostedt@goodmis.org,rodrigo.vivi@intel.com,peterz@infradead.org,peterx@redhat.com,mingo@kernel.org,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,luto@kernel.org,lorenzo.stoakes@oracle.com,liam.howlett@oracle.com,joonas.lahtinen@linux.intel.com,jannh@google.com,jani.nikula@linux.intel.com,hpa@zytor.com,bp@alien8.de,airlied@gmail.com,david@redhat.com,akpm@linux-foundation.org From: Andrew Morton Subject: + x86-mm-pat-remove-strict_prot-parameter-from-reserve_pfn_range.patch added to mm-new branch Message-Id: <20250512233433.955FCC4CEE7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: x86/mm/pat: remove strict_prot parameter from reserve_pfn_range() has been added to the -mm mm-new branch. Its filename is x86-mm-pat-remove-strict_prot-parameter-from-reserve_pfn_range.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/x86-mm-pat-remove-strict_prot-parameter-from-reserve_pfn_range.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: David Hildenbrand Subject: x86/mm/pat: remove strict_prot parameter from reserve_pfn_range() Date: Mon, 12 May 2025 14:34:20 +0200 Always set to 0, so let's remove it. Link: https://lkml.kernel.org/r/20250512123424.637989-8-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar # x86 bits Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: Liam Howlett Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- arch/x86/mm/pat/memtype.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/arch/x86/mm/pat/memtype.c~x86-mm-pat-remove-strict_prot-parameter-from-reserve_pfn_range +++ a/arch/x86/mm/pat/memtype.c @@ -858,8 +858,7 @@ int memtype_kernel_map_sync(u64 base, un * Reserved non RAM regions only and after successful memtype_reserve, * this func also keeps identity mapping (if any) in sync with this new prot. */ -static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, - int strict_prot) +static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot) { int is_ram = 0; int ret; @@ -895,8 +894,7 @@ static int reserve_pfn_range(u64 paddr, return ret; if (pcm != want_pcm) { - if (strict_prot || - !is_new_memtype_allowed(paddr, size, want_pcm, pcm)) { + if (!is_new_memtype_allowed(paddr, size, want_pcm, pcm)) { memtype_free(paddr, paddr + size); pr_err("x86/PAT: %s:%d map pfn expected mapping type %s for [mem %#010Lx-%#010Lx], got %s\n", current->comm, current->pid, @@ -906,10 +904,6 @@ static int reserve_pfn_range(u64 paddr, cattr_name(pcm)); return -EINVAL; } - /* - * We allow returning different type than the one requested in - * non strict case. - */ pgprot_set_cachemode(vma_prot, pcm); } @@ -959,7 +953,7 @@ int pfnmap_track(unsigned long pfn, unsi { const resource_size_t paddr = (resource_size_t)pfn << PAGE_SHIFT; - return reserve_pfn_range(paddr, size, prot, 0); + return reserve_pfn_range(paddr, size, prot); } void pfnmap_untrack(unsigned long pfn, unsigned long size) _ Patches currently in -mm which might be from david@redhat.com are selftests-mm-add-simple-vm_pfnmap-tests-based-on-mmaping-dev-mem.patch x86-mm-pat-factor-out-setting-cachemode-into-pgprot_set_cachemode.patch mm-convert-track_pfn_insert-to-pfnmap_setup_cachemode.patch mm-introduce-pfnmap_track-and-pfnmap_untrack-and-use-them-for-memremap.patch mm-convert-vm_pfnmap-tracking-to-pfnmap_track-pfnmap_untrack.patch x86-mm-pat-remove-old-pfnmap-tracking-interface.patch mm-remove-vm_pat.patch x86-mm-pat-remove-strict_prot-parameter-from-reserve_pfn_range.patch x86-mm-pat-remove-memtype__match.patch x86-mm-pat-inline-memtype_match-into-memtype_erase.patch drm-i915-track_pfn-pfnmap-tracking.patch mm-io-mapping-track_pfn-pfnmap-tracking.patch