On Tue, Feb 15, 2022 at 9:35 PM James D. Turner <linuxkernel.foss@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Alex, > > > I guess just querying the ATIF method does something that negatively > > influences the windows driver in the guest. Perhaps the platform > > thinks the driver has been loaded since the method has been called so > > it enables certain behaviors that require ATIF interaction that never > > happen because the ACPI methods are not available in the guest. > > Do you mean the `amdgpu_atif_pci_probe_handle` function? If it would be > helpful, I could try disabling that function and testing again. Correct. > > > I don't really have a good workaround other than blacklisting the > > driver since on bare metal the driver needs to use this interface for > > platform interactions. > > I'm not familiar with ATIF, but should `amdgpu_atif_pci_probe_handle` > really be called for PCI devices which are bound to vfio-pci? I'd expect > amdgpu to ignore such devices. > > As I understand it, starting with > f9b7f3703ff9 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)"), > the `amdgpu_acpi_detect` function loops over all PCI devices in the > `PCI_CLASS_DISPLAY_VGA` and `PCI_CLASS_DISPLAY_OTHER` classes to find > the ATIF and ATCS handles. Maybe skipping over any PCI devices bound to > vfio-pci would fix the issue? On a related note, shouldn't it also skip > over any PCI devices with non-AMD vendor IDs? The ACPI methods are global. There's only one instance of each per system and they are relevant to add GPUs on the platform. That's why they are a global resource in the driver. They can be hung off of the dGPU or APU ACPI namespace, depending on the platform which is why we check all of the display devices. Skipping them would prevent them from being available if you later bound the amdgpu driver to the GPU device(s) I think. Alex > > Regards, > James