stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Lijo Lazar" <lijo.lazar@amd.com>,
	"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>,
	"Guchun Chen" <guchun.chen@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Bokun Zhang" <bokun.zhang@amd.com>,
	"Jingwen Chen" <Jingwen.Chen2@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"for 3.8" <stable@vger.kernel.org>,
	"Victor Skvortsov" <victor.skvortsov@amd.com>,
	"Michel Dänzer" <mdaenzer@redhat.com>,
	"open list:RADEON and AMDGPU DRM DRIVERS"
	<amd-gfx@lists.freedesktop.org>,
	"Bernard Zhao" <bernard@vivo.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Candice Li" <candice.li@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Hawking Zhang" <Hawking.Zhang@amd.com>
Subject: Re: [PATCH] drm/amdgpu: do not use passthrough mode in Xen dom0
Date: Wed, 27 Apr 2022 10:47:36 -0400	[thread overview]
Message-ID: <CADnq5_Pbaz9omsd6sHmOzTM=7c9fNBa5PAUfW4GOT=rtT4Anjg@mail.gmail.com> (raw)
In-Reply-To: <20220426235718.1634359-1-marmarek@invisiblethingslab.com>

Applied.  Thanks!

Alex

On Wed, Apr 27, 2022 at 3:12 AM Marek Marczykowski-Górecki
<marmarek@invisiblethingslab.com> wrote:
>
> 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 b818a5d37454 ("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: b818a5d37454 ("drm/amdgpu/gmc: use PCI BARs for APUs in passthrough")
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index a025f080aa6a..5e3756643da3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -24,6 +24,7 @@
>  #include <linux/module.h>
>
>  #include <drm/drm_drv.h>
> +#include <xen/xen.h>
>
>  #include "amdgpu.h"
>  #include "amdgpu_ras.h"
> @@ -710,7 +711,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;
>         }
>
> --
> 2.35.1
>

      reply	other threads:[~2022-04-27 14:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 23:57 [PATCH] drm/amdgpu: do not use passthrough mode in Xen dom0 Marek Marczykowski-Górecki
2022-04-27 14:47 ` Alex Deucher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADnq5_Pbaz9omsd6sHmOzTM=7c9fNBa5PAUfW4GOT=rtT4Anjg@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Jingwen.Chen2@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bernard@vivo.com \
    --cc=bokun.zhang@amd.com \
    --cc=candice.li@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guchun.chen@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marmarek@invisiblethingslab.com \
    --cc=mdaenzer@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=victor.skvortsov@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).