Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-29 Thread Auger Eric
Hi Zenghui, On 1/29/21 1:15 PM, Zenghui Yu wrote: > Hi Eric, > > On 2021/1/29 5:30, Auger Eric wrote: >> Hi Zenghui, >> >> On 1/28/21 9:25 AM, Auger Eric wrote: >>> Hi Zenghui, >>> >>> On 12/25/20 10:50 AM, Zenghui Yu wrote: When performing range-based IOTLB invalidation, we should decode th

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-29 Thread Zenghui Yu
Hi Eric, On 2021/1/29 5:30, Auger Eric wrote: Hi Zenghui, On 1/28/21 9:25 AM, Auger Eric wrote: Hi Zenghui, On 12/25/20 10:50 AM, Zenghui Yu wrote: When performing range-based IOTLB invalidation, we should decode the TG field into the corresponding translation granule size so that we can pas

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-28 Thread Auger Eric
Hi Zenghui, On 1/28/21 9:25 AM, Auger Eric wrote: > Hi Zenghui, > > On 12/25/20 10:50 AM, Zenghui Yu wrote: >> When performing range-based IOTLB invalidation, we should decode the TG >> field into the corresponding translation granule size so that we can pass >> the correct invalidation range to

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-28 Thread Auger Eric
Hi Zenghui, On 12/25/20 10:50 AM, Zenghui Yu wrote: > When performing range-based IOTLB invalidation, we should decode the TG > field into the corresponding translation granule size so that we can pass > the correct invalidation range to backend. Set @granule to (tg * 2 + 10) to > properly emulate

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2020-12-25 Thread Zenghui Yu
On 2020/12/25 17:50, Zenghui Yu wrote: @@ -821,6 +821,8 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr, return; } granule = tt->granule_sz; +} else { +guanule = tg * 2 + 10; I'm embarrassed about that. s/guanule/granule/ }

[PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2020-12-25 Thread Zenghui Yu
When performing range-based IOTLB invalidation, we should decode the TG field into the corresponding translation granule size so that we can pass the correct invalidation range to backend. Set @granule to (tg * 2 + 10) to properly emulate the architecture. Fixes: d52915616c05 ("hw/arm/smmuv3: Get