All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Victor Zhao <Victor.Zhao@amd.com>
Cc: Emily Deng <emily.deng@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: add determine passthrough under arm64
Date: Mon, 24 Jan 2022 11:53:38 -0500	[thread overview]
Message-ID: <CADnq5_M0x9Y38X095Di2mYXVTVm4Pi1-w_F0gkempSYhSkfUWw@mail.gmail.com> (raw)
In-Reply-To: <20220124064525.1357499-1-Victor.Zhao@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

On Mon, Jan 24, 2022 at 1:45 AM Victor Zhao <Victor.Zhao@amd.com> wrote:
>
> add determine for passthrough mode under arm64 by reading
> CurrentEL register
>
> Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> index c5edd84c1c12..40803aab136f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> @@ -296,6 +296,8 @@ static inline bool is_virtual_machine(void)
>  {
>  #ifdef CONFIG_X86
>         return boot_cpu_has(X86_FEATURE_HYPERVISOR);
> +#elif CONFIG_ARM64
> +       return !is_kernel_in_hyp_mode();
>  #else
>         return false;
>  #endif
> --
> 2.25.1
>

      reply	other threads:[~2022-01-24 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  6:45 [PATCH] drm/amdgpu: add determine passthrough under arm64 Victor Zhao
2022-01-24 16:53 ` 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_M0x9Y38X095Di2mYXVTVm4Pi1-w_F0gkempSYhSkfUWw@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=Victor.Zhao@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=emily.deng@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.