qemu_domain: NVLink2 bridge detection function for PPC64
qemu_domain: NVLink2 bridge detection function for PPC64

The NVLink2 support in QEMU implements the detection of NVLink2
capable devices by verifying the attributes of the VFIO mem region
QEMU allocates for the NVIDIA GPUs. To properly allocate an
adequate amount of memLock, Libvirt needs this information before
a QEMU instance is even created, thus querying QEMU is not
possible and opening a VFIO window is too much.

An alternative is presented in this patch. Making the following
assumptions:

- if we want GPU RAM to be available in the guest, an NVLink2 bridge
must be passed through;

- an unknown PCI device can be classified as a NVLink2 bridge
if its device tree node has 'ibm,gpu', 'ibm,nvlink',
'ibm,nvlink-speed' and 'memory-region'.

This patch introduces a helper called @ppc64VFIODeviceIsNV2Bridge
that checks the device tree node of a given PCI device and
check if it meets the criteria to be a NVLink2 bridge. This
new function will be used in a follow-up patch that, using the
first assumption, will set up the rlimits of the guest
accordingly.

Signed-off-by: Daniel Henrique Barboza <627b089ad62deae9aaf06ccfa2c9056df28927e0@gmail.com>

libvirt/libvirt,eskultety/libvirt,eskultety/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,zippy2/libvirt,olafhering/libvirt,eskultety/libvirt,olafhering/libvirt,olafhering/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,crobinso/libvirt,nertpinx/libvirt,zippy2/libvirt,fabianfreyer/libvirt,crobinso/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,eskultety/libvirt,andreabolognani/libvirt,nertpinx/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,libvirt/libvirt,libvirt/libvirt,crobinso/libvirt,andreabolognani/libvirt,zippy2/libvirt,jardasgit/libvirt,olafhering/libvirt,jfehlig/libvirt,jfehlig/libvirt,andreabolognani/libvirt,eskultety/libvirt,jardasgit/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,andreabolognani/libvirt,nertpinx/libvirt,andreabolognani/libvirt