qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling
Date: Thu, 22 Aug 2013 11:11:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto:
>      iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
> -    end = (section->offset_within_address_space + 
> int128_get64(section->size)) &
> -          TARGET_PAGE_MASK;
> +    llend = int128_make64(section->offset_within_address_space);
> +    llend = int128_add(llend, section->size);
> +    llend = int128_and(llend, int128_exts64(TARGET_PAGE_MASK));
>  
> -    if (iova >= end) {
> +    if (int128_ge(int128_make64(iova), llend)) {
>          return;
>      }
>  
> +    end = (section->offset_within_address_space + 
> int128_get64(section->size)) &
> +          TARGET_PAGE_MASK;
> +

This can still fail for section->size = 2^64.  Do your IOMMU patches
take care of it?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]