Re: [PATCH 11/20] vfio/cxl: Expose DPA memory region to userspace with fault+zap mmap
From: Dave Jiang
Date: Fri Mar 13 2026 - 13:13:44 EST
On 3/11/26 1:34 PM, mhonap@xxxxxxxxxx wrote:
> From: Manish Honap <mhonap@xxxxxxxxxx>
< --snip-- >
> +int vfio_cxl_register_cxl_region(struct vfio_pci_core_device *vdev)
> +{
> + struct vfio_pci_cxl_state *cxl = vdev->cxl;
> + u32 flags;
> + int ret;
> +
> + if (!cxl)
> + return -ENODEV;
> +
> + if (!cxl->region || cxl->region_vaddr)
> + return -ENODEV;
> +
> + cxl->region_vaddr = ioremap_cache(cxl->region_hpa, cxl->region_size);
Should this be using memremap_pages() family of call rather than ioremap() like how DAX does it? CXL mem regions are not MMIO regions.
DJ