On Sat, Sep 23, 2023 at 08:03:34AM +0530, Ani Sinha wrote:
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index c0ce896668..c1fb69170f 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3770,9 +3770,9 @@ static void vtd_address_space_unmap(VTDAddressSpace 
> *as, IOMMUNotifier *n)
>      while (remain >= VTD_PAGE_SIZE) {
>          IOMMUTLBEvent event;
>          uint64_t mask = dma_aligned_pow2_mask(start, end, s->aw_bits);
> -        uint64_t size = mask + 1;
> +        uint64_t sz = mask + 1;
>  
> -        assert(size);
> +        assert(sz);
>  
>          event.type = IOMMU_NOTIFIER_UNMAP;
>          event.entry.iova = start;
> @@ -3784,8 +3784,8 @@ static void vtd_address_space_unmap(VTDAddressSpace 
> *as, IOMMUNotifier *n)
>  
>          memory_region_notify_iommu_one(n, &event);
>  
> -        start += size;
> -        remain -= size;
> +        start += sz;
> +        remain -= sz;
>      }
>  
>      assert(!remain);

Ani,

I've got a small patch for this hunk already:

https://lore.kernel.org/r/20230922160410.138786-1-pet...@redhat.com

Wouldn't hurt to merge both, though.. or just drop the other one.

Reviewed-by: Peter Xu <pet...@redhat.com>

Thanks,

-- 
Peter Xu


Reply via email to