qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v1 0/4] Expose GPU memory as coherently CPU accessible
@ 2023-06-05 23:50 ankita
  2023-06-05 23:50 ` [RFC v1 1/4] qemu: add GPU memory information as object ankita
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: ankita @ 2023-06-05 23:50 UTC (permalink / raw)
  To: ankita, jgg, alex.williamson; +Cc: qemu-devel

From: Ankit Agrawal <ankita@nvidia.com>

NVIDIA is building systems which allows the CPU to coherently access
GPU memory. This GPU device memory can be added and managed by the
kernel memory manager. The patch holds the required changes in QEMU
to expose this memory to the device assigned VMs.

The GPU device memory region is exposed as device BAR1 and QEMU mmaps to
it. It then adds new proximity domains to represent the memory in the
VM ACPI SRAT. This allows the device memory to be added as separate NUMA
nodes inside the VM. The proximity domains (PXM) are passed to the VM
using ACPI DSD properties to help VM kernel modules add the memory.

Current Linux cannot create NUMA nodes on the fly, hence creating enough
NUMA nodes in ACPI is needed so that they are available at the VM bootup
time. The physical platform firwmare provides 8 NUMA nodes, which QEMU
is emulating here.

A new vfio-pci variant driver is added to manage the device memory and
report as a BAR. Ongoing review of the corresponding kernel side changes
along with the new vfio-pci variant driver.
Ref: https://lore.kernel.org/lkml/20230405180134.16932-1-ankita@nvidia.com/

Applied over v8.0.2.

Ankit Agrawal (4):
  qemu: add GPU memory information as object
  qemu: patch guest SRAT for GPU memory
  qemu: patch guest DSDT for GPU memory
  qemu: adjust queried bar size to power-of-2

 hw/arm/virt-acpi-build.c    | 54 ++++++++++++++++++++++++++++
 hw/pci-host/gpex-acpi.c     | 71 ++++++++++++++++++++++++++++++++++++
 hw/vfio/common.c            |  2 +-
 hw/vfio/pci-quirks.c        | 13 +++++++
 hw/vfio/pci.c               | 72 +++++++++++++++++++++++++++++++++++++
 hw/vfio/pci.h               |  1 +
 include/hw/pci/pci_device.h |  3 ++
 7 files changed, 215 insertions(+), 1 deletion(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-06-06 15:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05 23:50 [RFC v1 0/4] Expose GPU memory as coherently CPU accessible ankita
2023-06-05 23:50 ` [RFC v1 1/4] qemu: add GPU memory information as object ankita
2023-06-06 15:19   ` Alex Williamson
2023-06-05 23:50 ` [RFC v1 2/4] qemu: patch guest SRAT for GPU memory ankita
2023-06-06  4:58   ` Philippe Mathieu-Daudé
2023-06-05 23:50 ` [RFC v1 3/4] qemu: patch guest DSDT " ankita
2023-06-05 23:50 ` [RFC v1 4/4] qemu: adjust queried bar size to power-of-2 ankita
2023-06-06  5:03   ` Philippe Mathieu-Daudé
2023-06-06 12:54   ` Alex Williamson
2023-06-06 14:19     ` Philippe Mathieu-Daudé
2023-06-06 14:54 ` [RFC v1 0/4] Expose GPU memory as coherently CPU accessible Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).