Re: [PATCH v4 19/25] proc/task_mmu: Ignore ZONE_DEVICE pages

2025-01-05 Thread Alistair Popple
On Fri, Dec 20, 2024 at 07:32:52PM +0100, David Hildenbrand wrote: > On 19.12.24 00:11, Alistair Popple wrote: > > On Tue, Dec 17, 2024 at 11:31:25PM +0100, David Hildenbrand wrote: > > > On 17.12.24 06:13, Alistair Popple wrote: > > > > The procfs mmu files such as smaps currently ignore device da

Re: [PATCH v4 15/25] huge_memory: Add vmf_insert_folio_pud()

2025-01-05 Thread Alistair Popple
On Fri, Dec 20, 2024 at 07:52:43PM +0100, David Hildenbrand wrote: > On 17.12.24 06:12, 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 v4 14/14] iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h index 0a08aa82e7cc..55e3d5a14cca 100644 --- a/include/uapi/linux/iommufd.h +++ b/include/uapi/linux/iommufd.h @@ -1016,9 +1016,24 @@ struct iommu_ioas_change_process { /** * enum iom

Re: [PATCH v4 12/14] Documentation: userspace-api: iommufd: Update FAULT and VEVENTQ

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: With the introduction of the new objects, update the doc to reflect that. Signed-off-by: Nicolin Chen --- Documentation/userspace-api/iommufd.rst | 16 1 file changed, 16 insertions(+) Reviewed-by: Lu Baolu

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

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: Similar to iommu_report_device_fault, this allows IOMMU drivers to report vIOMMU events from threaded IRQ handlers to user space hypervisors. Signed-off-by: Nicolin Chen --- include/linux/iommufd.h| 11 ++ drivers/iommu/iommufd/driver.c | 4

Re: [PATCH v4 07/14] iommufd/viommu: Add iommufd_viommu_get_vdev_id helper

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: This is a reverse search v.s. iommufd_viommu_find_dev, as drivers may want to convert a struct device pointer (physical) to its virtual device ID for an event injection to the user space VM. Again, this avoids exposing more core structures to the drivers, tha

Re: [PATCH v4 06/14] iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: Introduce a new IOMMUFD_OBJ_VEVENTQ object for vIOMMU Event Queue that provides user space (VMM) another FD to read the vIOMMU Events. Allow a vIOMMU object to allocate vEVENTQs, with a condition that each vIOMMU can only have one single vEVENTQ per type. Ad

Re: [PATCH v4 05/14] iommufd: Rename fault.c to eventq.c

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: Rename the file, aligning with the new eventq object. Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen --- drivers/iommu/iommufd/Makefile | 2 +- drivers/iommu/iommufd/{fault.c => eventq.c} | 0 2 files changed, 1 insertion(+), 1 deletion(

Re: [PATCH v4 04/14] iommufd: Abstract an iommufd_eventq from iommufd_fault

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: The fault object was designed exclusively for hwpt's IO page faults (PRI). But its queue implementation can be reused for other purposes too, such as hardware IRQ and event injections to user space. Meanwhile, a fault object holds a list of faults. So it's mo

Re: [PATCH v4 03/14] iommufd/fault: Move iommufd_fault_iopf_handler() to header

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: The new vEVENTQ object will need a similar function for drivers to report the vIOMMU related events. Split the common part out to a smaller helper, and place it in the header so that CONFIG_IOMMUFD_DRIVER_CORE can include that in the driver.c file for drivers

Re: [PATCH v4 02/14] iommufd/fault: Add an iommufd_fault_init() helper

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: The infrastructure of a fault object will be shared with a new vEVENTQ object in a following change. Add a helper for a vEVENTQ allocator to call it too. Reorder the iommufd_ctx_get and refcount_inc, to keep them symmetrical with the iommufd_fault_fops_releas

Re: [PATCH v4 01/14] iommufd: Keep IOCTL list in an alphabetical order

2025-01-05 Thread Baolu Lu
On 1/4/25 03:43, Nicolin Chen wrote: Move VDEVICE upward to keep the order. Also run clang-format for the same coding style at line wrappings. No functional change. Signed-off-by: Nicolin Chen --- drivers/iommu/iommufd/main.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions

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

2025-01-05 Thread Alistair Popple
On Fri, Dec 20, 2024 at 08:06:48PM +0100, David Hildenbrand wrote: > On 20.12.24 20:01, David Hildenbrand wrote: > > On 17.12.24 06:12, Alistair Popple wrote: > > > In preparation for using insert_page() for DAX, enhance > > > insert_page_into_pte_locked() to handle establishing writable > > > mapp