From: Yi Liu <yi.l.liu@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <joro@8bytes.org>, <jgg@nvidia.com>, <kevin.tian@intel.com>,
<baolu.lu@linux.intel.com>, <alex.williamson@redhat.com>,
<eric.auger@redhat.com>, <nicolinc@nvidia.com>,
<kvm@vger.kernel.org>, <chao.p.peng@linux.intel.com>,
<iommu@lists.linux.dev>, <zhenzhong.duan@intel.com>,
<linux-kselftest@vger.kernel.org>, <vasant.hegde@amd.com>
Subject: Re: [PATCH v3 1/4] ida: Add ida_find_first_range()
Date: Sat, 14 Sep 2024 12:16:57 +0800 [thread overview]
Message-ID: <ebc8812c-c16d-4465-a730-c1e49e211cc5@intel.com> (raw)
In-Reply-To: <ZuRVu088KuMbtqsm@casper.infradead.org>
On 2024/9/13 23:09, Matthew Wilcox wrote:
> On Fri, Sep 13, 2024 at 07:45:55PM +0800, Yi Liu wrote:
>>> No test cases for the test suite? ;-(
>>
>> let me add something like the below. :)
>
> That looks pretty comprehensive, thanks!
>
> Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
thanks, and FYI. I found a bug when running the unit test. will fix it
in the next version. it's really helpful suggestion.
diff --git a/lib/idr.c b/lib/idr.c
index 6644d3d1af02..f16eb3d172bc 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -494,6 +494,7 @@ int ida_find_first_range(struct ida *ida, unsigned int
min, unsigned int max)
unsigned int offset = min % IDA_BITMAP_BITS;
unsigned long *addr, size, bit;
unsigned long flags;
+ unsigned long tmp = 0;
void *entry;
int ret;
@@ -518,8 +519,7 @@ int ida_find_first_range(struct ida *ida, unsigned int
min, unsigned int max)
}
if (xa_is_value(entry)) {
- unsigned long tmp = xa_to_value(entry);
-
+ tmp = xa_to_value(entry);
addr = &tmp;
size = BITS_PER_XA_VALUE;
} else {
--
Regards,
Yi Liu
next prev parent reply other threads:[~2024-09-14 4:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 13:17 [PATCH v3 0/4] vfio-pci support pasid attach/detach Yi Liu
2024-09-12 13:17 ` [PATCH v3 1/4] ida: Add ida_find_first_range() Yi Liu
2024-09-12 15:11 ` Matthew Wilcox
2024-09-13 11:45 ` Yi Liu
2024-09-13 15:09 ` Matthew Wilcox
2024-09-14 4:16 ` Yi Liu [this message]
2024-09-26 19:11 ` Jason Gunthorpe
2024-09-30 7:49 ` Tian, Kevin
2024-09-12 13:17 ` [PATCH v3 2/4] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices Yi Liu
2024-09-26 19:13 ` Jason Gunthorpe
2024-09-12 13:17 ` [PATCH v3 3/4] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT Yi Liu
2024-09-26 19:16 ` Jason Gunthorpe
2024-09-30 7:55 ` Tian, Kevin
2024-10-01 12:11 ` Jason Gunthorpe
2024-10-12 13:49 ` Yi Liu
2024-10-14 15:49 ` Alex Williamson
2024-10-15 11:07 ` Yi Liu
2024-10-15 16:22 ` Alex Williamson
2024-10-16 3:35 ` Yi Liu
2024-10-16 16:11 ` Alex Williamson
2024-10-18 5:40 ` Yi Liu
2024-10-30 12:54 ` Yi Liu
2024-10-30 17:51 ` Alex Williamson
2024-10-31 7:23 ` Yi Liu
2024-09-12 13:17 ` [PATCH v3 4/4] iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability Yi Liu
2024-09-26 19:35 ` Jason Gunthorpe
2024-09-27 3:08 ` Yi Liu
2024-09-30 8:03 ` Tian, Kevin
2024-10-22 10:08 ` Vasant Hegde
2024-10-28 6:41 ` Zhangfei Gao
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=ebc8812c-c16d-4465-a730-c1e49e211cc5@intel.com \
--to=yi.l.liu@intel.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=chao.p.peng@linux.intel.com \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=vasant.hegde@amd.com \
--cc=willy@infradead.org \
--cc=zhenzhong.duan@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).