lkml.org 
[lkml]   [2024]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch] memory: tegra: Skip SID override from Guest VM
From
On 06/02/2024 12:48, Sumit Gupta wrote:
> MC SID register access is restricted for Guest VM.
> So, skip the SID override programming from the Guest VM.
>
> Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
> ---
> drivers/memory/tegra/tegra186.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
> index 1b3183951bfe..df441896b69d 100644
> --- a/drivers/memory/tegra/tegra186.c
> +++ b/drivers/memory/tegra/tegra186.c
> @@ -10,6 +10,7 @@
> #include <linux/of.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
> +#include <asm/virt.h>

Are you sure this still compile tests?

>
> #include <soc/tegra/mc.h>
>
> @@ -118,6 +119,11 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
> unsigned int i, index = 0;
> u32 sid;
>
> + if (!is_kernel_in_hyp_mode()) {
> + dev_dbg(mc->dev, "Register access not allowed\n");

Doesn't this depend on hypervisor?

> + return 0;
> + }
> +
> if (!tegra_dev_iommu_get_stream_id(dev, &sid))
> return 0;

Best regards,
Krzysztof


\
 
 \ /
  Last update: 2024-05-27 14:50    [W:0.153 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site