[PATCH v9 2/3] hw/acpi: Implement the SRAT GI affinity structure

2024-03-08 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v9 1/3] qom: new object to associate device to NUMA node

2024-03-08 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v9 0/3] acpi: report NUMA nodes for device memory using GI

2024-03-08 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v9 3/3] hw/i386/acpi-build: Add support for SRAT Generic Initiator structures

2024-03-08 Thread ankita
From: Ankit Agrawal The acpi-generic-initiator object is added to allow a host device to be linked with a NUMA node. Qemu use it to build the SRAT Generic Initiator Affinity structure [1]. Add support for i386. [1] ACPI Spec 6.3, Section 5.2.16.6 Suggested-by: Jonathan Cameron Signed-off-by:

[PATCH v8 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-06 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v8 1/2] qom: new object to associate device to NUMA node

2024-03-06 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v8 0/2] acpi: report NUMA nodes for device memory using GI

2024-03-06 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v7 1/2] qom: new object to associate device to numa node

2024-02-23 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v7 0/2] acpi: report numa nodes for device memory using GI

2024-02-23 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v7 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-02-23 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v6 2/2] hw/acpi: Implement the SRAT GI affinity structure

2023-12-24 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v6 0/2] acpi: report numa nodes for device memory using GI

2023-12-24 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v6 1/2] qom: new object to associate device to numa node

2023-12-24 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v5 2/2] hw/acpi: Implement the SRAT GI affinity structure

2023-12-02 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v5 1/2] qom: new object to associate device to numa node

2023-12-02 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v5 0/2] acpi: report numa nodes for device memory using GI

2023-12-02 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v4 2/2] hw/acpi: Implement the SRAT GI affinity structure

2023-11-19 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v4 1/2] qom: new object to associate device to numa node

2023-11-19 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v4 0/2] acpi: report numa nodes for device memory using GI

2023-11-19 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v3 1/2] qom: new object to associate device to numa node

2023-11-07 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v3 2/2] hw/acpi: Implement the SRAT GI affinity structure

2023-11-07 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v3 0/2] vfio/nvgpu: Add vfio pci variant module for grace hopper

2023-11-07 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v2 3/3] qom: Link multiple numa nodes to device using a new object

2023-10-07 Thread ankita
From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of the partitioned memory needs a dedicated NUMA node to operate. The partitions are not

[PATCH v2 2/3] hw/acpi: Implement the SRAT GI affinity structure

2023-10-07 Thread ankita
From: Ankit Agrawal ACPI spec provides a scheme to associate "Generic Initiators" [1] (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with integrated compute or DMA engines GPUs) with Proximity Domains. This is achieved using Generic Initiator Affinity Structure in SRAT.

[PATCH v2 1/3] qom: new object to associate device to numa node

2023-10-07 Thread ankita
From: Ankit Agrawal The CPU cache coherent device memory can be added as NUMA nodes distinct from the system memory nodes. These nodes are associated with the device and Qemu needs a way to maintain this link. Introduce a new acpi-generic-initiator object to allow host admin provide the device

[PATCH v2 0/3] acpi: report numa nodes for device memory using GI

2023-10-07 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

[PATCH v1 0/4] vfio: report NUMA nodes for device memory

2023-09-14 Thread ankita
From: Ankit Agrawal For devices which allow CPU to cache coherently access their memory, it is sensible to expose such memory as NUMA nodes separate from the sysmem node. Qemu currently do not provide a mechanism for creation of NUMA nodes associated with a vfio-pci device. Implement a

[PATCH v1 1/4] vfio: new command line params for device memory NUMA nodes

2023-09-14 Thread ankita
From: Ankit Agrawal The CPU cache coherent device memory can be added as a set of NUMA nodes distinct from the system memory nodes. The Qemu currently do not provide a mechanism to support node creation for a vfio-pci device. Introduce new command line parameters to allow host admin provide the

[PATCH v1 4/4] acpi/gpex: patch guest DSDT for dev mem information

2023-09-14 Thread ankita
From: Ankit Agrawal To add the memory in the guest as NUMA nodes, it needs the PXM node index and the total count of nodes associated with the memory. The range of proximity domains are communicated to the VM as part of the guest ACPI using the nvidia,gpu-mem-pxm-start and

[PATCH v1 3/4] hw/arm/virt-acpi-build: patch guest SRAT for NUMA nodes

2023-09-14 Thread ankita
From: Ankit Agrawal During bootup, Linux kernel parse the ACPI SRAT to determine the PXM ids. This allows for the creation of NUMA nodes for each unique id. Insert a series of the unique PXM ids in the VM SRAT ACPI table. The range of nodes can be determined from the "dev_mem_pxm_start" and

[PATCH v1 2/4] vfio: assign default values to node params

2023-09-14 Thread ankita
From: Ankit Agrawal It may be desirable for some deployments to have QEMU automatically pick a range and create the NUMA nodes. So the admin need not care about passing any additional params. Another advantage is that the feature is not dependent on newer libvirt that support the new parameters

[RFC v1 3/4] qemu: patch guest DSDT for GPU memory

2023-06-05 Thread ankita
From: Ankit Agrawal To add the memory in the guest as NUMA nodes, it needs the PXM node index and the total count of nodes associated with the memory. The range of proximity domains are communicated to the VM as part of the guest ACPI using the nvidia,gpu-mem-pxm-start and

[RFC v1 2/4] qemu: patch guest SRAT for GPU memory

2023-06-05 Thread ankita
From: Ankit Agrawal The guest VM adds the GPU memory as (upto 8) separate memory-less NUMA nodes. ACPI SRAT need to thus insert proximity domains and tag them as MEM_AFFINITY_HOTPLUGGABLE. The VM kernel can then parse the SRAT and create NUMA nodes. Signed-off-by: Ankit Agrawal ---

[RFC v1 4/4] qemu: adjust queried bar size to power-of-2

2023-06-05 Thread ankita
From: Ankit Agrawal The GPU device memory is reported to the VM as a BAR. The device memory may not be aligned to the power-of-2, but the QEMU expects the PCI BAR to be. Align the reported device memory size to the next power-of-2 before QEMU does an mmap. Signed-off-by: Ankit Agrawal ---

[RFC v1 0/4] Expose GPU memory as coherently CPU accessible

2023-06-05 Thread ankita
From: Ankit Agrawal 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

[RFC v1 1/4] qemu: add GPU memory information as object

2023-06-05 Thread ankita
From: Ankit Agrawal The GPU memory is exposed as device BAR1 to the VM and is discovered by QEMU through the VFIO_DEVICE_GET_REGION_INFO ioctl. QEMU performs the mapping to it. The GPU memory can be added in the VM as (upto 8) separate NUMA nodes. To achieve this, QEMU inserts a series of the