Re: [PATCH v8 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper

From: Ankit Agrawal
Date: Mon Sep 11 2023 - 16:48:33 EST


>> > Does it mean that this requires maintaining a new guest driver
>> > different from the existing one on bare metal?
>>
>> No, the VM would use the same Nvidia open source driver that is used by the
>> bare metal. (https://github.com/NVIDIA/open-gpu-kernel-modules).
>
> because this driver already supports two ways of accessing the aperture:
> one via the firmware table, the other using this fake BAR2?

Yes, exactly. The driver supports both ways. An absence of ACPI DSD device
property describing the device memory (that happens for the virtualization case)
when Qemu does not expose them via VM ACPI) provides an indication to the
driver that it needs to use the fake BAR (and determine the memory properties
from it); use the memory region otherwise.