[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<SA1PR12MB7199828D7A0B824E1781E161B0D8A@SA1PR12MB7199.namprd12.prod.outlook.com>
Date: Tue, 2 Dec 2025 17:11:09 +0000
From: Ankit Agrawal <ankita@...dia.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>, Alex Williamson
<alex@...zbot.org>, Andrew Morton <akpm@...ux-foundation.org>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next
Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the vfio tree with the mm-stable tree
> From: Stephen Rothwell <sfr@...b.auug.org.au>
> Date: Mon, 1 Dec 2025 11:10:51 +1100
> Subject: [PATCH] fix up for "vfio/nvgrace-gpu: Add support for huge pfnmap"
>
> interacting with commit
>
> ebb9aeb980e5 ("vfio/nvgrace-gpu: register device memory for poison handling")
>
> from the mm-stable tree.
>
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
> drivers/vfio/pci/nvgrace-gpu/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 4104f46fb378..c6eddb7b823a 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -292,6 +292,7 @@ static int nvgrace_gpu_mmap(struct vfio_device *core_vdev,
> struct mem_region *memregion;
> u64 req_len, pgoff, end;
> unsigned int index;
>+ int ret = 0;
>
> index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);>
>
Thanks Stephen for taking a look at this and resolving the conflict.
However, there is a different change needed that I posted below
created over next-20251202. Let me know if you are okay with
merging it.
Thanks
Ankit Agrawal
---
drivers/vfio/pci/nvgrace-gpu/main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
index c6eddb7b823a..ed0c6a63e05a 100644
--- a/drivers/vfio/pci/nvgrace-gpu/main.c
+++ b/drivers/vfio/pci/nvgrace-gpu/main.c
@@ -77,13 +77,14 @@ static int
nvgrace_gpu_vfio_pci_register_pfn_range(struct mem_region *region,
struct vm_area_struct *vma)
{
- unsigned long nr_pages;
- int ret = 0;
+ unsigned long nr_pages, base_pfn;
+ int ret;
nr_pages = region->memlength >> PAGE_SHIFT;
+ base_pfn = PHYS_PFN(region->memphys);
- region->pfn_address_space.node.start = vma->vm_pgoff;
- region->pfn_address_space.node.last = vma->vm_pgoff + nr_pages - 1;
+ region->pfn_address_space.node.start = base_pfn;
+ region->pfn_address_space.node.last = base_pfn + nr_pages - 1;
region->pfn_address_space.mapping = vma->vm_file->f_mapping;
ret = register_pfn_address_space(®ion->pfn_address_space);
--
2.34.1
Powered by blists - more mailing lists