Re: [PATCH v6 23/26] mm: Remove pXX_devmap callers

2025-01-14 Thread Alistair Popple
On Tue, Jan 14, 2025 at 10:50:49AM -0800, Dan Williams wrote: > Alistair Popple wrote: > > The devmap PTE special bit was used to detect mappings of FS DAX > > pages. This tracking was required to ensure the generic mm did not > > manipulate the page reference counts as FS DAX implemented it's own

Re: [PATCH v6 16/26] huge_memory: Add vmf_insert_folio_pmd()

2025-01-14 Thread Alistair Popple
On Tue, Jan 14, 2025 at 09:22:00AM -0800, Dan Williams wrote: > David Hildenbrand wrote: > > > +vm_fault_t vmf_insert_folio_pmd(struct vm_fault *vmf, struct folio > > > *folio, bool write) > > > +{ > > > + struct vm_area_struct *vma = vmf->vma; > > > + unsigned long addr = vmf->address & PMD_MASK;

Re: [PATCH net-next v2 12/14] net: ethernet: qualcomm: Initialize PPE L2 bridge settings

2025-01-14 Thread Lei Wei
On 1/14/2025 9:02 PM, Andrew Lunn wrote: I would like to clarify that representing the bridge and its slave ports inside PPE (using a VSI - virtual switch instance) is a pre-requisite before learning can take place on a port. At this point, since switchdev is not enabled, VSI is not created fo

Re: [PATCH v6 15/26] huge_memory: Add vmf_insert_folio_pud()

2025-01-14 Thread Alistair Popple
On Tue, Jan 14, 2025 at 05:22:15PM +0100, David Hildenbrand wrote: > On 10.01.25 07:00, Alistair Popple wrote: > > Currently DAX folio/page reference counts are managed differently to > > normal pages. To allow these to be managed the same as normal pages > > introduce vmf_insert_folio_pud. This wi

Re: [PATCH v6 13/26] mm/memory: Add vmf_insert_page_mkwrite()

2025-01-14 Thread Alistair Popple
On Tue, Jan 14, 2025 at 05:15:54PM +0100, David Hildenbrand wrote: > On 10.01.25 07:00, Alistair Popple wrote: > > Currently to map a DAX page the DAX driver calls vmf_insert_pfn. This > > creates a special devmap PTE entry for the pfn but does not take a > > reference on the underlying struct page

Re: [PATCH v6 08/26] fs/dax: Remove PAGE_MAPPING_DAX_SHARED mapping flag

2025-01-14 Thread Dan Williams
Alistair Popple wrote: [..] > > How does this case happen? I don't think any page would ever enter with > > both ->mapping and ->share set, right? > > Sigh. You're right - it can't. This patch series is getting a litte bit large > and unweildy with all the prerequisite bugfixes and cleanups. Obvio

Re: [PATCH v6 12/26] mm/memory: Enhance insert_page_into_pte_locked() to create writable mappings

2025-01-14 Thread Alistair Popple
On Mon, Jan 13, 2025 at 05:08:31PM -0800, Dan Williams wrote: > Alistair Popple wrote: > > In preparation for using insert_page() for DAX, enhance > > insert_page_into_pte_locked() to handle establishing writable > > mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a > > PTE whic

Re: [PATCH v6 08/26] fs/dax: Remove PAGE_MAPPING_DAX_SHARED mapping flag

2025-01-14 Thread Alistair Popple
On Mon, Jan 13, 2025 at 04:52:34PM -0800, Dan Williams wrote: > Alistair Popple wrote: > > PAGE_MAPPING_DAX_SHARED is the same as PAGE_MAPPING_ANON. > > I think a bit a bit more detail is warranted, how about? > > The page ->mapping pointer can have magic values like > PAGE_MAPPING_DAX_SHARED an

Re: [PATCH v2 3/3] tun: Set num_buffers for virtio 1.0

2025-01-14 Thread Akihiko Odaki
On 2025/01/13 12:04, Jason Wang wrote: On Fri, Jan 10, 2025 at 7:12 PM Akihiko Odaki wrote: On 2025/01/10 19:23, Michael S. Tsirkin wrote: On Fri, Jan 10, 2025 at 11:27:13AM +0800, Jason Wang wrote: On Thu, Jan 9, 2025 at 2:59 PM Akihiko Odaki wrote: The specification says the device MUST

[PATCH v5 1/3] RISC-V: Enable cbo.clean/flush in usermode

2025-01-14 Thread Yunhui Cui
Enabling cbo.clean and cbo.flush in user mode makes it more convenient to manage the cache state and achieve better performance. Reviewed-by: Andrew Jones Signed-off-by: Yunhui Cui --- arch/riscv/kernel/cpufeature.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/riscv/kernel/c

[PATCH v5 3/3] RISC-V: selftests: Add TEST_ZICBOM into CBO tests

2025-01-14 Thread Yunhui Cui
Add test for Zicbom and its block size into CBO tests, when Zicbom is present, test that cbo.clean/flush may be issued and works. As the software can't verify the clean/flush functions, we just judged that cbo.clean/flush isn't executed illegally. Reviewed-by: Andrew Jones Reviewed-by: Samuel Hol

[PATCH v5 2/3] RISC-V: hwprobe: Expose Zicbom extension and its block size

2025-01-14 Thread Yunhui Cui
Expose Zicbom through hwprobe and also provide a key to extract its respective block size. Signed-off-by: Yunhui Cui --- Documentation/arch/riscv/hwprobe.rst | 6 ++ arch/riscv/include/asm/hwprobe.h | 2 +- arch/riscv/include/uapi/asm/hwprobe.h | 2 ++ arch/riscv/kernel/sys_hwprobe.c

[PATCH v5 0/3] Enable Zicbom in usermode

2025-01-14 Thread Yunhui Cui
v1/v2: There is only the first patch: RISC-V: Enable cbo.clean/flush in usermode, which mainly removes the enabling of cbo.inval in user mode. v3: Add the functionality of Expose Zicbom and selftests for Zicbom. v4: Modify the order of macros, The test_no_cbo_inval function is added separately.

Re: [PATCH v8 02/21] cxl/mem: Read dynamic capacity configuration from the device

2025-01-14 Thread Dan Williams
Ira Weiny wrote: > Devices which optionally support Dynamic Capacity (DC) are configured > via mailbox commands. CXL 3.1 requires the host to issue the Get DC > Configuration command in order to properly configure DCDs. Without the > Get DC Configuration command DCD can't be supported. > > Imple

Re: [PATCH 2/3] docs: submitting-patches: clarify difference between Acked-by and Reviewed-by

2025-01-14 Thread Darrick J. Wong
On Sun, Jan 12, 2025 at 10:50:32AM -0500, Neal Gompa wrote: > On Sun, Jan 12, 2025 at 10:30 AM Miguel Ojeda wrote: > > > > Newcomers to the kernel need to learn the different tags that are > > used in commit messages and when to apply them. Acked-by is sometimes > > misunderstood, since the docume

Re: [PATCH v5 01/14] iommufd: Keep OBJ/IOCTL lists in an alphabetical order

2025-01-14 Thread Jason Gunthorpe
On Tue, Jan 07, 2025 at 09:10:04AM -0800, Nicolin Chen wrote: > Reorder the existing OBJ/IOCTL lists. > > Also run clang-format for the same coding style at line wrappings. > > No functional change. > > Reviewed-by: Lu Baolu > Signed-off-by: Nicolin Chen > --- > drivers/iommu/iommufd/main.c |

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Konstantin Ryabitsev
On Tue, Jan 14, 2025 at 07:29:14PM +0100, Brendan Jackman wrote: > > Tweaks aimed at checkpatch are only useful during the code review stage, so > > once that code is accepted upstream, they become wholly irrelevant. A > > checkpatch trailer in the permanent commit record serves no purpose, not >

Re: [PATCH v6 25/26] Revert "riscv: mm: Add support for ZONE_DEVICE"

2025-01-14 Thread Dan Williams
Alistair Popple wrote: > DEVMAP PTEs are no longer required to support ZONE_DEVICE so remove > them. > > Signed-off-by: Alistair Popple > Suggested-by: Chunyan Zhang > Reviewed-by: Björn Töpel This and the next are candidates to squash into the previous remove patch, right? ...and I am not sur

Re: [PATCH v13 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2025-01-14 Thread Sami Tolvanen
On Tue, Jan 14, 2025 at 10:22:15AM +0900, Masahiro Yamada wrote: > On Tue, Jan 14, 2025 at 5:04 AM Sami Tolvanen wrote: > > > > Hi Masahiro, > > > > On Fri, Jan 10, 2025 at 6:26 PM Masahiro Yamada > > wrote: > > > > > > On Sat, Jan 4, 2025 at 2:37 AM Matthew Maurer wrote: > > > > > > > > From:

Re: [PATCH v6 24/26] mm: Remove devmap related functions and page table bits

2025-01-14 Thread Dan Williams
Alistair Popple wrote: > Now that DAX and all other reference counts to ZONE_DEVICE pages are > managed normally there is no need for the special devmap PTE/PMD/PUD > page table bits. So drop all references to these, freeing up a > software defined page table bit on architectures supporting it. >

Re: [PATCH v6 23/26] mm: Remove pXX_devmap callers

2025-01-14 Thread Dan Williams
Alistair Popple wrote: > The devmap PTE special bit was used to detect mappings of FS DAX > pages. This tracking was required to ensure the generic mm did not > manipulate the page reference counts as FS DAX implemented it's own > reference counting scheme. > > Now that FS DAX pages have their ref

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Brendan Jackman
On Tue, 14 Jan 2025 at 17:04, Konstantin Ryabitsev wrote: > > On Tue, Jan 14, 2025 at 03:25:41PM +0100, Brendan Jackman wrote: > > wrote: > > > Do we really want this to become part of the permanent commit message? I'm > > > pretty sure this won't go over well with many. > > > > Why not? > > Twea

Re: [PATCH v6 16/26] huge_memory: Add vmf_insert_folio_pmd()

2025-01-14 Thread Dan Williams
David Hildenbrand wrote: > > +vm_fault_t vmf_insert_folio_pmd(struct vm_fault *vmf, struct folio *folio, > > bool write) > > +{ > > + struct vm_area_struct *vma = vmf->vma; > > + unsigned long addr = vmf->address & PMD_MASK; > > + struct mm_struct *mm = vma->vm_mm; > > + spinlock_t *ptl; >

Re: [PATCH v6 19/26] proc/task_mmu: Mark devdax and fsdax pages as always unpinned

2025-01-14 Thread David Hildenbrand
On 14.01.25 03:28, Dan Williams wrote: Alistair Popple wrote: The procfs mmu files such as smaps and pagemap currently ignore devdax and fsdax pages because these pages are considered special. A future change will start treating these as normal pages, meaning they can be exposed via smaps and pa

Re: [PATCH v6 16/26] huge_memory: Add vmf_insert_folio_pmd()

2025-01-14 Thread David Hildenbrand
+vm_fault_t vmf_insert_folio_pmd(struct vm_fault *vmf, struct folio *folio, bool write) +{ + struct vm_area_struct *vma = vmf->vma; + unsigned long addr = vmf->address & PMD_MASK; + struct mm_struct *mm = vma->vm_mm; + spinlock_t *ptl; + pgtable_t pgtable = NULL; + +

Re: [PATCH v4 1/1] Documentation: hyperv: Add overview of guest VM hibernation

2025-01-14 Thread Roman Kisel
On 1/13/2025 6:56 AM, mhkelle...@gmail.com wrote: From: Michael Kelley [...] An incredible read, thank you, Michael! Reviewed-by: Roman Kisel diff --git a/Documentation/virt/hyperv/index.rst b/Documentation/virt/hyperv/index.rst index 79bc4080329e..c84c40fd61c9 100644 --- a/Documentat

Re: [PATCH v6 15/26] huge_memory: Add vmf_insert_folio_pud()

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: Currently DAX folio/page reference counts are managed differently to normal pages. To allow these to be managed the same as normal pages introduce vmf_insert_folio_pud. This will map the entire PUD-sized folio and take references as it would for a normall

Re: [PATCH v6 13/26] mm/memory: Add vmf_insert_page_mkwrite()

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: Currently to map a DAX page the DAX driver calls vmf_insert_pfn. This creates a special devmap PTE entry for the pfn but does not take a reference on the underlying struct page for the mapping. This is because DAX page refcounts are treated specially, as

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Konstantin Ryabitsev
On Tue, Jan 14, 2025 at 03:25:41PM +0100, Brendan Jackman wrote: > wrote: > > Do we really want this to become part of the permanent commit message? I'm > > pretty sure this won't go over well with many. > > Why not? Tweaks aimed at checkpatch are only useful during the code review stage, so onc

[PATCH bpf-next v5 4/4] igc: Add launch time support to XDP ZC

2025-01-14 Thread Song Yoong Siang
Enable Launch Time Control (LTC) support to XDP zero copy via XDP Tx metadata framework. This patch is tested with tools/testing/selftests/bpf/xdp_hw_metadata on Intel I225-LM Ethernet controller. Below are the test steps and result. Test Steps: 1. At DUT, start xdp_hw_metadata selftest applicati

[PATCH bpf-next v5 3/4] net: stmmac: Add launch time support to XDP ZC

2025-01-14 Thread Song Yoong Siang
Enable launch time (Time-Based Scheduling) support to XDP zero copy via XDP Tx metadata framework. This patch is tested with tools/testing/selftests/bpf/xdp_hw_metadata on Intel Tiger Lake platform. Below are the test steps and result. Test Steps: 1. At DUT, start xdp_hw_metadata selftest applica

[PATCH bpf-next v5 2/4] selftests/bpf: Add launch time request to xdp_hw_metadata

2025-01-14 Thread Song Yoong Siang
Add launch time hardware offload request to xdp_hw_metadata. Users can configure the delta of launch time relative to HW RX-time using the "-l" argument. By default, the delta is set to 0 ns, which means the launch time is disabled. By setting the delta to a non-zero value, the launch time hardware

[PATCH bpf-next v5 1/4] xsk: Add launch time hardware offload support to XDP Tx metadata

2025-01-14 Thread Song Yoong Siang
Extend the XDP Tx metadata framework so that user can requests launch time hardware offload, where the Ethernet device will schedule the packet for transmission at a pre-determined time called launch time. The value of launch time is communicated from user space to Ethernet driver via launch_time f

[PATCH bpf-next v5 0/4] xsk: TX metadata Launch Time support

2025-01-14 Thread Song Yoong Siang
This series expands the XDP TX metadata framework to allow user applications to pass per packet 64-bit launch time directly to the kernel driver, requesting launch time hardware offload support. The XDP TX metadata framework will not perform any clock conversion or packet reordering. Please note t

Re: [PATCH v6 12/26] mm/memory: Enhance insert_page_into_pte_locked() to create writable mappings

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: In preparation for using insert_page() for DAX, enhance insert_page_into_pte_locked() to handle establishing writable mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a PTE which bypasses the typical set_pte_range() in finish_fault. Si

Re: [PATCH v6 11/26] mm: Allow compound zone device pages

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: Zone device pages are used to represent various type of device memory managed by device drivers. Currently compound zone device pages are not supported. This is because MEMORY_DEVICE_FS_DAX pages are the only user of higher order zone device pages and hav

Re: [PATCH v6 10/26] mm/mm_init: Move p2pdma page refcount initialisation to p2pdma

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: Currently ZONE_DEVICE page reference counts are initialised by core memory management code in __init_zone_device_page() as part of the memremap() call which driver modules make to obtain ZONE_DEVICE pages. This initialises page refcounts to 1 before retur

Re: [PATCH v6 08/26] fs/dax: Remove PAGE_MAPPING_DAX_SHARED mapping flag

2025-01-14 Thread David Hildenbrand
On 10.01.25 07:00, Alistair Popple wrote: PAGE_MAPPING_DAX_SHARED is the same as PAGE_MAPPING_ANON. This isn't currently a problem because FS DAX pages are treated specially. However a future change will make FS DAX pages more like normal pages, so folio_test_anon() must not return true for a FS

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Brendan Jackman
On Tue, 14 Jan 2025 at 14:34, Konstantin Ryabitsev wrote: > Do we really want this to become part of the permanent commit message? I'm > pretty sure this won't go over well with many. Why not?

Re: [PATCH v5 08/14] iommufd/viommu: Add iommufd_viommu_report_event helper

2025-01-14 Thread Jason Gunthorpe
On Mon, Jan 13, 2025 at 12:44:37PM -0800, Nicolin Chen wrote: > > You'd want to push a special event when the first overflow happens and > > probably also report a counter so userspace can know how many events > > got lost. > > How about this: > > enum iommufd_veventq_header_type { > IOMMU

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Konstantin Ryabitsev
On Mon, Jan 13, 2025 at 04:04:22PM +, Brendan Jackman wrote: > Checkpatch sometimes has false positives. This makes it less useful for > automatic usage: tools like b4 [0] can run checkpatch on all of your > patches and give you a quick overview. When iterating on a branch, it's > tiresome to m

Re: [PATCH net-next v2 12/14] net: ethernet: qualcomm: Initialize PPE L2 bridge settings

2025-01-14 Thread Andrew Lunn
> I would like to clarify that representing the bridge and its slave ports > inside PPE (using a VSI - virtual switch instance) is a pre-requisite before > learning can take place on a port. At this point, since switchdev > is not enabled, VSI is not created for port/bridge and hence FDB learning >

Re: [PATCH 0/7] kcov: Introduce New Unique PC|EDGE|CMP Modes

2025-01-14 Thread Joey Jiao
On Tue, Jan 14, 2025 at 11:43:08AM +0100, Marco Elver wrote: > On Tue, 14 Jan 2025 at 06:35, Jiao, Joey wrote: > > > > Hi, > > > > This patch series introduces new kcov unique modes: > > `KCOV_TRACE_UNIQ_[PC|EDGE|CMP]`, which are used to collect unique PC, EDGE, > > CMP information. > > > > Backgr

Re: [External] Re: [PATCH v4 2/3] RISC-V: hwprobe: Expose Zicbom extension and its block size

2025-01-14 Thread Andrew Jones
On Tue, Jan 14, 2025 at 08:17:02PM +0800, yunhui cui wrote: > Hi Samuel, > > On Tue, Jan 14, 2025 at 1:28 PM Samuel Holland > wrote: > > > > Hi Yunhui, > > > > On 2025-01-13 8:19 PM, Yunhui Cui wrote: > > > Expose Zicbom through hwprobe and also provide a key to extract its > > > respective block

Re: [PATCH 0/7] kcov: Introduce New Unique PC|EDGE|CMP Modes

2025-01-14 Thread Joey Jiao
On Tue, Jan 14, 2025 at 12:02:31PM +0100, Dmitry Vyukov wrote: > On Tue, 14 Jan 2025 at 11:43, Marco Elver wrote: > > On Tue, 14 Jan 2025 at 06:35, Jiao, Joey wrote: > > > > > > Hi, > > > > > > This patch series introduces new kcov unique modes: > > > `KCOV_TRACE_UNIQ_[PC|EDGE|CMP]`, which are us

Re: [External] Re: [PATCH v4 2/3] RISC-V: hwprobe: Expose Zicbom extension and its block size

2025-01-14 Thread yunhui cui
Hi Samuel, On Tue, Jan 14, 2025 at 1:28 PM Samuel Holland wrote: > > Hi Yunhui, > > On 2025-01-13 8:19 PM, Yunhui Cui wrote: > > Expose Zicbom through hwprobe and also provide a key to extract its > > respective block size. > > > > Signed-off-by: Yunhui Cui > > --- > > Documentation/arch/riscv/

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Brendan Jackman
On Tue, 14 Jan 2025 at 12:42, Brendan Jackman wrote: > I think that's a downgrade from the Checkpatch-args approach (Sorry I mean Checkpatch-ignore of course)

Re: [PATCH 1/2] checkpatch: Add support for Checkpatch-ignore patch footer

2025-01-14 Thread Brendan Jackman
On Mon, 13 Jan 2025, 20:15 Joe Perches, wrote: > > On Mon, 2025-01-13 at 16:04 +, Brendan Jackman wrote: > > Checkpatch sometimes has false positives. This makes it less useful for > > automatic usage: tools like b4 [0] can run checkpatch on all of your > > patches and give you a quick overvie

Re: [PATCH net-next v2 12/14] net: ethernet: qualcomm: Initialize PPE L2 bridge settings

2025-01-14 Thread Lei Wei
On 1/13/2025 9:37 PM, Andrew Lunn wrote: Why is learning needed on physical ports? In general, switches forward unknown destination addresses to the CPU. Which is what you want when the ports are isolated from each other. Everything goes to the CPU. But maybe this switch does not work like thi

Re: [PATCH 0/7] kcov: Introduce New Unique PC|EDGE|CMP Modes

2025-01-14 Thread Dmitry Vyukov
On Tue, 14 Jan 2025 at 11:43, Marco Elver wrote: > On Tue, 14 Jan 2025 at 06:35, Jiao, Joey wrote: > > > > Hi, > > > > This patch series introduces new kcov unique modes: > > `KCOV_TRACE_UNIQ_[PC|EDGE|CMP]`, which are used to collect unique PC, EDGE, > > CMP information. > > > > Background > > --

Re: [PATCH 0/7] kcov: Introduce New Unique PC|EDGE|CMP Modes

2025-01-14 Thread Marco Elver
On Tue, 14 Jan 2025 at 06:35, Jiao, Joey wrote: > > Hi, > > This patch series introduces new kcov unique modes: > `KCOV_TRACE_UNIQ_[PC|EDGE|CMP]`, which are used to collect unique PC, EDGE, > CMP information. > > Background > -- > > In the current kcov implementation, when `__sanitizer_cov

Re: [PATCH v4 3/3] RISC-V: selftests: Add TEST_ZICBOM into CBO tests

2025-01-14 Thread Andrew Jones
On Tue, Jan 14, 2025 at 10:19:36AM +0800, Yunhui Cui wrote: > Add test for Zicbom and its block size into CBO tests, when > Zicbom is present, test that cbo.clean/flush may be issued and works. > As the software can't verify the clean/flush functions, we just judged > that cbo.clean/flush isn't exe