Re: [PATCH v5 0/6] qemu: acpi-generic-initiator support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 06, 2025 at 02:42:10PM +0200, Andrea Righi via Devel wrote:
> = Overview =
> 
> This patch set introduces support for acpi-generic-initiator devices,
> supported by QEMU [1].
> 
> The acpi-generic-initiator object is required to support Multi-Instance GPU
> (MIG) configurations on NVIDIA GPUs [2]. MIG enables partitioning of GPU
> resources into multiple isolated instances, each requiring a dedicated NUMA
> node definition.


Ok, this took me a while to understand, but after looking at the actual
QEMU code for acpi-generic-initiator it is finally clear how ridiculously
simple the entire use case is.

We can have multiple virtual NUMA nodes, which traditionally would have
virtual CPUs and RAM assigned. Virtual PCI devices could be indirectly
associated with a NUMA node by having them placed on a PXB which has
affinity with a *single* NUMA node.

For the NVIDIA GPU use case, however, the PCI device itself to have
direct affinity with *multiple* NUMA nodes. Those nodes would not have
any CPUs or memory associated with them typically. Conceptually that
is an easy thing to model in the XML.


The 'acpi-generic-initiator' object exposed by QEMU is a direct
reflection of how the NUMA affinity is mapped at the ACPI table
level. This is an inappropriate low level impl detail to expose
at a high level, as well as being an insanely verbose way to
configure what is really just a bitmask (of NUMA node IDs)
against a device.

IOW, we should not expose any of this acpi-generic-initiator stuff
in libvirt XML at all.

In the virDomainDeviceInfo struct we record 'acpiIndex' which
is a property that sets an ACPI table index for PCI devices.
This maps to the XML:

   <acpi index='8'/>

We should extend virDomainDeviceInfo to hold 'virBitmap *acpiNodeset'
to record the NUMA affinity of PCI devives (if any), and expose
this as a bitset on the existing <acpi> element eg 

   <acpi nodeset="3-5,8-10,11,15' index='8'/>

Or possibly 'numaNodeset' as the attr name.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux