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