lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoReq/kNi368x79q@Asurada-Nvidia>
Date: Tue, 2 Jul 2024 13:10:19 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Will Deacon <will@...nel.org>
CC: <robin.murphy@....com>, <joro@...tes.org>, <jgg@...dia.com>,
	<thierry.reding@...il.com>, <vdumpa@...dia.com>, <jonathanh@...dia.com>,
	<linux-kernel@...r.kernel.org>, <iommu@...ts.linux.dev>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v9 4/6] iommu/arm-smmu-v3: Add CS_NONE quirk for
 CONFIG_TEGRA241_CMDQV

On Tue, Jul 02, 2024 at 12:47:14PM -0700, Nicolin Chen wrote:
> @@ -345,6 +345,11 @@ static void arm_smmu_cmdq_build_sync_cmd(u64 *cmd, struct arm_smmu_device *smmu,
>  		FIELD_PREP(CMDQ_SYNC_0_MSH, ARM_SMMU_SH_ISH) |
>  		FIELD_PREP(CMDQ_SYNC_0_MSIATTR, ARM_SMMU_MEMATTR_OIWB);
>  
> +	if (cmdq->type == TEGRA241_VCMDQ) {
> +		cmd[0] |= FIELD_PREP(CMDQ_SYNC_0_CS, CMDQ_SYNC_0_CS_NONE);
> +		return;
> +	}
> +
> 	if (!(smmu->options & ARM_SMMU_OPT_MSIPOLL)) {
> 		cmd[0] |= FIELD_PREP(CMDQ_SYNC_0_CS, CMDQ_SYNC_0_CS_SEV);
> 		return;
> @@ -690,7 +695,8 @@ static int arm_smmu_cmdq_poll_until_sync(struct arm_smmu_device *smmu,
>  					struct arm_smmu_cmdq *cmdq,
>  					struct arm_smmu_ll_queue *llq)
>  {
> -	if (smmu->options & ARM_SMMU_OPT_MSIPOLL)
> +	if (smmu->options & ARM_SMMU_OPT_MSIPOLL &&
> +	    cmdq->type != TEGRA241_VCMDQ) {
>  		return __arm_smmu_cmdq_poll_until_msi(smmu, cmdq, llq);
>  
> --------------------------------------------------------------
> 
> Would you prefer this one? I feel CMDQ_QUIRK_SYNC_CS_NONE_ONLY
> is more general looking though..

And we would need some additional lines of comments for the two
pieces above, explaining why TEGRA241_VCMDQ type needs the first
one while bypasses the second one. Again, it feels even worse :(

Thanks
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ