Re: [PATCH v1 2/2] vfio/iova_bitmap: Fix PAGE_SIZE unaligned bitmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 25, 2022 at 10:37:39AM +0000, Joao Martins wrote:

> > Yes, when we move this to iommufd the test suite should be included,
> > either as integrated using the mock domain and the selftests or
> > otherwise.
>
> So in iommufd counterpart I have already tests which exercise this. But not as
> extensive.

We are getting to the point where we should start posting the iommufd
dirty tracking stuff. Do you have time to work on it for the next
cycle? Meaning get it largely sorted out in the next 3 weeks for review?

> > void iova_bitmap_set(struct iova_bitmap *bitmap,
> > 		     unsigned long iova, size_t length)
> > {
> > 	struct iova_bitmap_map *mapped = &bitmap->mapped;
> > 	unsigned cur_bit =
> > 		((iova - mapped->iova) >> mapped->pgshift) + mapped->pgoff * 8;
> > 	unsigned long last_bit =
> > 		(((iova + length - 1) - mapped->iova) >> mapped->pgshift) +
> > 		mapped->pgoff * 8;
> > 
> > 	do {
> > 		unsigned int page_idx = cur_bit / BITS_PER_PAGE;
> > 		unsigned int nbits =
> > 			min(BITS_PER_PAGE - cur_bit, last_bit - cur_bit + 1);

min(BITS_PER_PAGE - (cur_bit % BITS_PER_PAGE), ...)

> Not sure if the vfio tree is a rebasing tree (or not?) and can just send a new
> version, 

It isn't, you should just post a new patch on top of Alex's current
tree "rework iova_bitmap_et to handle all page crossings" and along
the way revert the first bit

Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux