<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/vfio/pci/nvgrace-gpu, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-19T17:25:24Z</updated>
<entry>
<title>Merge tag 'common_phys_vec_via_vfio' into v6.20/vfio/next</title>
<updated>2026-01-19T17:25:24Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2026-01-19T17:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fab06e956fce42f07ad35ca53073504bad2a080f'/>
<id>urn:sha1:fab06e956fce42f07ad35ca53073504bad2a080f</id>
<content type='text'>
 * Reuse common phys_vec, phase out dma_buf_phys_vec

Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>types: reuse common phys_vec type instead of DMABUF open‑coded variant</title>
<updated>2026-01-19T17:13:29Z</updated>
<author>
<name>Leon Romanovsky</name>
</author>
<published>2026-01-07T09:14:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b703b31ea8cd22c1915cfdd6d8e39bf39ec64c8b'/>
<id>urn:sha1:b703b31ea8cd22c1915cfdd6d8e39bf39ec64c8b</id>
<content type='text'>
After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
we can use the shared phys_vec type instead of the DMABUF‑specific
dma_buf_phys_vec, which duplicated the same structure and semantics.

Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Reviewed-by: Kevin Tian &lt;kevin.tian@intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20260107-convert-to-pvec-v1-1-6e3ab8079708@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace-gpu: register device memory for poison handling</title>
<updated>2026-01-19T17:06:31Z</updated>
<author>
<name>Ankit Agrawal</name>
</author>
<published>2026-01-15T20:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5f19b619fa0b691ccb537d72240bd20eb72087c'/>
<id>urn:sha1:e5f19b619fa0b691ccb537d72240bd20eb72087c</id>
<content type='text'>
The nvgrace-gpu module [1] maps the device memory to the user VA (Qemu)
without adding the memory to the kernel. The device memory pages are PFNMAP
and not backed by struct page. The module can thus utilize the MM's PFNMAP
memory_failure mechanism that handles ECC/poison on regions with no struct
pages.

The kernel MM code exposes register/unregister APIs allowing modules to
register the device memory for memory_failure handling. Make nvgrace-gpu
register the GPU memory with the MM on open.

The module registers its memory region, the address_space with the
kernel MM for ECC handling and implements a callback function to convert
the PFN to the file page offset. The callback functions checks if the
PFN belongs to the device memory region and is also contained in the
VMA range, an error is returned otherwise.

Link: https://lore.kernel.org/all/20240220115055.23546-1-ankita@nvidia.com/ [1]

Suggested-by: Alex Williamson &lt;alex@shazbot.org&gt;
Suggested-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Reviewed-by: Jiaqi Yan &lt;jiaqiyan@google.com&gt;
Link: https://lore.kernel.org/r/20260115202849.2921-3-ankita@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Disable qword access to the PCI ROM bar</title>
<updated>2025-12-23T21:07:08Z</updated>
<author>
<name>Kevin Tian</name>
</author>
<published>2025-12-18T08:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc85a46928c41423ad89869baf05a589e2975575'/>
<id>urn:sha1:dc85a46928c41423ad89869baf05a589e2975575</id>
<content type='text'>
Commit 2b938e3db335 ("vfio/pci: Enable iowrite64 and ioread64 for vfio
pci") enables qword access to the PCI bar resources. However certain
devices (e.g. Intel X710) are observed with problem upon qword accesses
to the rom bar, e.g. triggering PCI aer errors.

This is triggered by Qemu which caches the rom content by simply does a
pread() of the remaining size until it gets the full contents. The other
bars would only perform operations at the same access width as their
guest drivers.

Instead of trying to identify all broken devices, universally disable
qword access to the rom bar i.e. going back to the old way which worked
reliably for years.

Reported-by: Farrah Chen &lt;farrah.chen@intel.com&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220740
Fixes: 2b938e3db335 ("vfio/pci: Enable iowrite64 and ioread64 for vfio pci")
Cc: stable@vger.kernel.org
Signed-off-by: Kevin Tian &lt;kevin.tian@intel.com&gt;
Tested-by: Farrah Chen &lt;farrah.chen@intel.com&gt;
Link: https://lore.kernel.org/r/20251218081650.555015-2-kevin.tian@intel.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace-gpu: wait for the GPU mem to be ready</title>
<updated>2025-11-28T17:09:26Z</updated>
<author>
<name>Ankit Agrawal</name>
</author>
<published>2025-11-27T17:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a23b10608d420346e5af7eda6c46726a61572469'/>
<id>urn:sha1:a23b10608d420346e5af7eda6c46726a61572469</id>
<content type='text'>
Speculative prefetches from CPU to GPU memory until the GPU is
ready after reset can cause harmless corrected RAS events to
be logged on Grace systems. It is thus preferred that the
mapping not be re-established until the GPU is ready post reset.

The GPU readiness can be checked through BAR0 registers similar
to the checking at the time of device probe.

It can take several seconds for the GPU to be ready. So it is
desirable that the time overlaps as much of the VM startup as
possible to reduce impact on the VM bootup time. The GPU
readiness state is thus checked on the first fault/huge_fault
request or read/write access which amortizes the GPU readiness
time.

The first fault and read/write checks the GPU state when the
reset_done flag - which denotes whether the GPU has just been
reset. The memory_lock is taken across map/access to avoid
races with GPU reset.

Also check if the memory is enabled, before waiting for GPU
to be ready. Otherwise the readiness check would block for 30s.

Lastly added PM handling wrapping on read/write access.

Cc: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Cc: Alex Williamson &lt;alex@shazbot.org&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Vikram Sethi &lt;vsethi@nvidia.com&gt;
Reviewed-by: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Suggested-by: Alex Williamson &lt;alex@shazbot.org&gt;
Signed-off-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Link: https://lore.kernel.org/r/20251127170632.3477-7-ankita@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace-gpu: Inform devmem unmapped after reset</title>
<updated>2025-11-28T17:07:26Z</updated>
<author>
<name>Ankit Agrawal</name>
</author>
<published>2025-11-27T17:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfe765499abfbdb9df0f2e70ebb1199c7d2fc65e'/>
<id>urn:sha1:dfe765499abfbdb9df0f2e70ebb1199c7d2fc65e</id>
<content type='text'>
Introduce a new flag reset_done to notify that the GPU has just
been reset and the mapping to the GPU memory is zapped.

Implement the reset_done handler to set this new variable. It
will be used later in the patches to wait for the GPU memory
to be ready before doing any mapping or access.

Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Reviewed-by: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Suggested-by: Alex Williamson &lt;alex@shazbot.org&gt;
Signed-off-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Link: https://lore.kernel.org/r/20251127170632.3477-6-ankita@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace-gpu: split the code to wait for GPU ready</title>
<updated>2025-11-28T17:07:25Z</updated>
<author>
<name>Ankit Agrawal</name>
</author>
<published>2025-11-27T17:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d055071d73bac7acc3a0b441f0632f564f048fe'/>
<id>urn:sha1:7d055071d73bac7acc3a0b441f0632f564f048fe</id>
<content type='text'>
Split the function that check for the GPU device being ready on
the probe.

Move the code to wait for the GPU to be ready through BAR0 register
reads to a separate function. This would help reuse the code.

This also fixes a bug where the return status in case of timeout
gets overridden by return from pci_enable_device. With the fix,
a timeout generate an error as initially intended.

Fixes: d85f69d520e6 ("vfio/nvgrace-gpu: Check the HBM training and C2C link status")

Reviewed-by: Zhi Wang &lt;zhiw@nvidia.com&gt;
Reviewed-by: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Signed-off-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Link: https://lore.kernel.org/r/20251127170632.3477-5-ankita@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace-gpu: Add support for huge pfnmap</title>
<updated>2025-11-28T17:07:25Z</updated>
<author>
<name>Ankit Agrawal</name>
</author>
<published>2025-11-27T17:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9db65489b87298f20baef683e70143c108959793'/>
<id>urn:sha1:9db65489b87298f20baef683e70143c108959793</id>
<content type='text'>
NVIDIA's Grace based systems have large device memory. The device
memory is mapped as VM_PFNMAP in the VMM VMA. The nvgrace-gpu
module could make use of the huge PFNMAP support added in mm [1].

To make use of the huge pfnmap support, fault/huge_fault ops
based mapping mechanism needs to be implemented. Currently nvgrace-gpu
module relies on remap_pfn_range to do the mapping during VM bootup.
Replace it to instead rely on fault and use vfio_pci_vmf_insert_pfn
to setup the mapping.

Moreover to enable huge pfnmap, nvgrace-gpu module is updated by
adding huge_fault ops implementation. The implementation establishes
mapping according to the order request. Note that if the PFN or the
VMA address is unaligned to the order, the mapping fallbacks to
the PTE level.

Link: https://lore.kernel.org/all/20240826204353.2228736-1-peterx@redhat.com/ [1]

Cc: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Cc: Alex Williamson &lt;alex@shazbot.org&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Vikram Sethi &lt;vsethi@nvidia.com&gt;
Reviewed-by: Zhi Wang &lt;zhiw@nvidia.com&gt;
Reviewed-by: Shameer Kolothum &lt;skolothumtho@nvidia.com&gt;
Signed-off-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Link: https://lore.kernel.org/r/20251127170632.3477-3-ankita@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'vfio-v6.19-dma-buf-v9+' into v6.19/vfio/next</title>
<updated>2025-11-21T04:20:00Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2025-11-21T04:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa804aa4ac1b091ef2ec2981f08a1c28aaeba8e7'/>
<id>urn:sha1:fa804aa4ac1b091ef2ec2981f08a1c28aaeba8e7</id>
<content type='text'>
[v9] vfio/pci: Allow MMIO regions to be exported through dma-buf

https://lore.kernel.org/all/20251120-dmabuf-vfio-v9-0-d7f71607f371@nvidia.com

Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio/nvgrace: Support get_dmabuf_phys</title>
<updated>2025-11-21T04:15:17Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2025-11-20T09:28:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5415d887db0e059920cb5673a32cc4d66daa280f'/>
<id>urn:sha1:5415d887db0e059920cb5673a32cc4d66daa280f</id>
<content type='text'>
Call vfio_pci_core_fill_phys_vec() with the proper physical ranges for the
synthetic BAR 2 and BAR 4 regions. Otherwise use the normal flow based on
the PCI bar.

This demonstrates a DMABUF that follows the region info report to only
allow mapping parts of the region that are mmapable. Since the BAR is
power of two sized and the "CXL" region is just page aligned the there can
be a padding region at the end that is not mmaped or passed into the
DMABUF.

The "CXL" ranges that are remapped into BAR 2 and BAR 4 areas are not PCI
MMIO, they actually run over the CXL-like coherent interconnect and for
the purposes of DMA behave identically to DRAM. We don't try to model this
distinction between true PCI BAR memory that takes a real PCI path and the
"CXL" memory that takes a different path in the p2p framework for now.

Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Reviewed-by: Kevin Tian &lt;kevin.tian@intel.com&gt;
Tested-by: Alex Mastro &lt;amastro@fb.com&gt;
Tested-by: Nicolin Chen &lt;nicolinc@nvidia.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Acked-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Reviewed-by: Ankit Agrawal &lt;ankita@nvidia.com&gt;
Link: https://lore.kernel.org/r/20251120-dmabuf-vfio-v9-11-d7f71607f371@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
</feed>
