From: jsg Date: Fri, 13 May 2022 03:17:30 +0000 (+0000) Subject: drm/amdgpu: do not use passthrough mode in Xen dom0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f543b0c1162a085b48eedc454a3ef1a540963bfc;p=openbsd drm/amdgpu: do not use passthrough mode in Xen dom0 From Marek Marczykowski-Gorecki 1a78d8fe6606aabcbdecef1745446f5a923a8e0a in linux 5.15.y/5.15.39 19965d8259fdabc6806da92adda49684f5bcbec5 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c index 71b4f13eb67..cb37575a7da 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c @@ -24,6 +24,7 @@ #include #include +#include #include "amdgpu.h" #include "amdgpu_ras.h" @@ -695,7 +696,8 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev) adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV; if (!reg) { - if (is_virtual_machine()) /* passthrough mode exclus sriov mod */ + /* passthrough mode exclus sriov mod */ + if (is_virtual_machine() && !xen_initial_domain()) adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE; }