mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fangyu.yu@linux.alibaba.com
To: gong.shuai@sanechips.com.cn
Cc: fangyu.yu@linux.alibaba.com, iommu@lists.linux.dev,
	kvm-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: Re: [RFC PATCH v5 03/10] iommu/riscv: report iommu capabilities
Date: Fri, 30 Oct 2026 10:49:46 +0800	[thread overview]
Message-ID: <20261030024946.93889-1-fangyu.yu@linux.alibaba.com> (raw)
In-Reply-To: <20261030023104.51259-1-gong.shuai@sanechips.com.cn>

>Hi Fangyu,
>
>> From: Tomasz Jeznach <tjeznach@rivosinc.com>
>>
>> Report RISC-V IOMMU capabilities required by VFIO subsystem
>> to enable PCIe device assignment.
>>
>> Signed-off-by: Tomasz Jeznach <tjeznach@rivosinc.com>
>> Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
>> Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
>
>This patch has already been merged
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3069e8f3e1e9bdf007316eadae4d1777065e7b78
>

Thanks for pointing that out. I'll drop this patch in the next version.

Thanks,
Fangyu

>Thanks,
>Shuai
>
>> ---
>>  drivers/iommu/riscv/iommu.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/iommu/riscv/iommu.c b/drivers/iommu/riscv/iommu.c
>> index fe8e6d0f8a23..40beccedd39f 100644
>> --- a/drivers/iommu/riscv/iommu.c
>> +++ b/drivers/iommu/riscv/iommu.c
>> @@ -1444,6 +1444,16 @@ static struct iommu_group *riscv_iommu_device_group(struct device *dev)
>>  	return generic_device_group(dev);
>>  }
>>
>> +static bool riscv_iommu_capable(struct device *dev, enum iommu_cap cap)
>> +{
>> +	switch (cap) {
>> +	case IOMMU_CAP_CACHE_COHERENCY:
>> +		return true;
>> +	default:
>> +		return false;
>> +	}
>> +}
>> +
>>  static int riscv_iommu_of_xlate(struct device *dev, const struct of_phandle_args *args)
>>  {
>>  	return iommu_fwspec_add_ids(dev, args->args, 1);
>> @@ -1505,6 +1515,7 @@ static void riscv_iommu_release_device(struct device *dev)
>>
>>  static const struct iommu_ops riscv_iommu_ops = {
>>  	.of_xlate = riscv_iommu_of_xlate,
>> +	.capable = riscv_iommu_capable,
>>  	.identity_domain = &riscv_iommu_identity_domain,
>>  	.blocked_domain = &riscv_iommu_blocking_domain,
>>  	.release_domain = &riscv_iommu_blocking_domain,
>> --
>> 2.50.1

  reply	other threads:[~2026-10-30  2:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  9:40 [RFC PATCH v5 00/10] iommu/riscv: Add hardware dirty tracking for second-stage domains fangyu.yu
2026-10-20  9:40 ` [RFC PATCH v5 01/10] iommupt: Add RISC-V Second-stage (iohgatp) page table support fangyu.yu
2026-10-28 15:28   ` Jason Gunthorpe
2026-10-20  9:40 ` [RFC PATCH v5 02/10] iommupt: Add RISC-V dirty tracking PTE ops fangyu.yu
2026-10-28 15:28   ` Jason Gunthorpe
2026-10-20  9:40 ` [RFC PATCH v5 03/10] iommu/riscv: report iommu capabilities fangyu.yu
2026-10-28 15:28   ` Jason Gunthorpe
2026-10-30  2:31   ` Gong Shuai
2026-10-30  2:49     ` fangyu.yu [this message]
2026-10-20  9:41 ` [RFC PATCH v5 04/10] iommu/riscv: use data structure instead of individual values fangyu.yu
2026-10-28 15:28   ` Jason Gunthorpe
2026-10-20  9:41 ` [RFC PATCH v5 05/10] iommu/riscv: support GSCID and GVMA invalidation command fangyu.yu
2026-10-20  9:41 ` [RFC PATCH v5 06/10] RISC-V: KVM: Enable KVM_VFIO interfaces on RISC-V arch fangyu.yu
2026-10-20  9:41 ` [RFC PATCH v5 07/10] iommu/riscv: Add domain_alloc_paging_flags for second-stage domain fangyu.yu
2026-10-28 15:28   ` Jason Gunthorpe
2026-10-29  1:41     ` fangyu.yu
2026-10-20  9:41 ` [RFC PATCH v5 08/10] iommu/riscv: Pre-enable GADE for second-stage domains fangyu.yu
2026-10-27 11:43   ` Nutty.Liu
2026-10-20  9:41 ` [RFC PATCH v5 09/10] iommu/riscv: Add dirty tracking support " fangyu.yu
2026-10-27 11:52   ` Nutty.Liu
2026-10-20  9:41 ` [RFC PATCH v5 10/10] iommu/riscv: Add IOTINVAL.GVMA invalidations fangyu.yu
2026-10-27 11:46   ` Nutty.Liu
2026-10-28 15:28 ` [RFC PATCH v5 00/10] iommu/riscv: Add hardware dirty tracking for second-stage domains Jason Gunthorpe
2026-10-29  1:52   ` fangyu.yu

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=20261030024946.93889-1-fangyu.yu@linux.alibaba.com \
    --to=fangyu.yu@linux.alibaba.com \
    --cc=gong.shuai@sanechips.com.cn \
    --cc=iommu@lists.linux.dev \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®