[PATCH] drm/amdgpu: add determine passthrough under arm64
Alex Deucher
alexdeucher at gmail.com
Mon Jan 24 16:53:38 UTC 2022
Acked-by: Alex Deucher <alexander.deucher at amd.com>
On Mon, Jan 24, 2022 at 1:45 AM Victor Zhao <Victor.Zhao at amd.com> wrote:
>
> add determine for passthrough mode under arm64 by reading
> CurrentEL register
>
> Signed-off-by: Victor Zhao <Victor.Zhao at 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
>
More information about the amd-gfx
mailing list