[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54d1b449-9a99-a6db-7655-ded82b883894@linux.microsoft.com>
Date: Tue, 28 Oct 2025 10:58:10 -0700
From: Mukesh R <mrathor@...ux.microsoft.com>
To: Alex Williamson <alex@...zbot.org>
Cc: alex.williamson@...hat.com, joe@...ches.com, kvm@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"wei.liu@...nel.org" <wei.liu@...nel.org>
Subject: Re: [RFC] Making vma_to_pfn() public (due to vm_pgoff change)
On 10/27/25 19:17, Alex Williamson wrote:
> On Mon, 27 Oct 2025 14:21:56 -0700
> Mukesh R <mrathor@...ux.microsoft.com> wrote:
>
>> Hi Alex,
>>
>> This regards vfio passthru support on hyperv running linux as dom0 aka
>> root. At a high level, cloud hypervisor uses vfio for set up as usual,
>> then maps the mmio ranges via the hyperv linux driver ioctls.
>>
>> Over a year ago, when working on this I had used vm_pgoff to get the pfn
>> for the mmio, that was 5.15 and early 6.x kernels. Now that I am porting
>> to 6.18 for upstreaming, I noticed:
>>
>> commit aac6db75a9fc
>> Author: Alex Williamson <alex.williamson@...hat.com>
>> vfio/pci: Use unmap_mapping_range()
>>
>> changed the behavior and vm_pgoff is no longer holding the pfn. In light
>> of that, I wondered if the following minor change, making vma_to_pfn()
>> public (after renaming it), would be acceptable to you.
>
> How do you know the device is using vfio_pci_core_mmap() with these
> semantics for vm_pgoff versus something like nvgrace_gpu_mmap() that
> uses vm_pgoff more like you're expecting? vma_to_pfn() is specific to
The gpu mmap will not come thru this ioctl path into the hyperv driver.
> uses vm_pgoff more like you're expecting? vma_to_pfn() is specific to
> the vfio-pci-core semantics, it's not portable to expose for other use
> cases. Thanks,
Ok. Will think of alternate way, just thought would check before going
that route.
Thanks,
-Mukesh
>
> Alex
Powered by blists - more mailing lists