Skip to content

Commit 19965d8

Browse files
marmarekalexdeucher
authored andcommitted
drm/amdgpu: do not use passthrough mode in Xen dom0
While technically Xen dom0 is a virtual machine too, it does have access to most of the hardware so it doesn't need to be considered a "passthrough". Commit b818a5d ("drm/amdgpu/gmc: use PCI BARs for APUs in passthrough") changed how FB is accessed based on passthrough mode. This breaks amdgpu in Xen dom0 with message like this: [drm:dc_dmub_srv_wait_idle [amdgpu]] *ERROR* Error waiting for DMUB idle: status=3 While the reason for this failure is unclear, the passthrough mode is not really necessary in Xen dom0 anyway. So, to unbreak booting affected kernels, disable passthrough mode in this case. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1985 Fixes: b818a5d ("drm/amdgpu/gmc: use PCI BARs for APUs in passthrough") Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 9d9f720 commit 19965d8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/module.h>
2525

2626
#include <drm/drm_drv.h>
27+
#include <xen/xen.h>
2728

2829
#include "amdgpu.h"
2930
#include "amdgpu_ras.h"
@@ -710,7 +711,8 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
710711
adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
711712

712713
if (!reg) {
713-
if (is_virtual_machine()) /* passthrough mode exclus sriov mod */
714+
/* passthrough mode exclus sriov mod */
715+
if (is_virtual_machine() && !xen_initial_domain())
714716
adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
715717
}
716718

0 commit comments

Comments
 (0)