[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RESEND 5/9] hw/arm/smmuv3: Store the starting level in SMMUTr
From: |
Auger Eric |
Subject: |
Re: [PATCH RESEND 5/9] hw/arm/smmuv3: Store the starting level in SMMUTransTableInfo |
Date: |
Fri, 26 Jun 2020 15:58:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Peter,
On 6/25/20 5:15 PM, Peter Maydell wrote:
> On Thu, 11 Jun 2020 at 17:15, Eric Auger <eric.auger@redhat.com> wrote:
>>
>> Compute the starting level on CD decoding and store it
>> into SMMUTransTableInfo. We will need this information
>> on IOTLB lookup so let's avoid to recompute it each time.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
>> --- a/hw/arm/smmu-common.c
>> +++ b/hw/arm/smmu-common.c
>> @@ -224,7 +224,7 @@ static int smmu_ptw_64(SMMUTransCfg *cfg,
>> granule_sz = tt->granule_sz;
>> stride = granule_sz - 3;
>> inputsize = 64 - tt->tsz;
>> - level = 4 - (inputsize - 4) / stride;
>> + level = tt->starting_level;
>
> "4 - (x - 4) / y" doesn't really seem like it's complicated
> enough to be worth caching given everything else we do on
> a page table walk. Do you have perf figures to indicate that
> this change is worthwhile?
no I don't have any figure or any setup at the moment to perform that
bench.
I thought it could only help, was not complicated to store and was of
the same kind as the granule size, the input range, ... already stored
in SMMUTransTableInfo.
Thanks
Eric
>
> thanks
> -- PMM
>
- Re: [PATCH RESEND 1/9] hw/arm/smmu-common: Factorize some code in smmu_ptw_64(), (continued)
- [PATCH RESEND 2/9] hw/arm/smmu-common: Add IOTLB helpers, Eric Auger, 2020/06/11
- [PATCH RESEND 3/9] hw/arm/smmu: Simplify the IOTLB key format, Eric Auger, 2020/06/11
- [PATCH RESEND 4/9] hw/arm/smmu: Introduce SMMUTLBEntry for PTW and IOTLB value, Eric Auger, 2020/06/11
- [PATCH RESEND 5/9] hw/arm/smmuv3: Store the starting level in SMMUTransTableInfo, Eric Auger, 2020/06/11
- [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries, Eric Auger, 2020/06/11
[PATCH RESEND 7/9] hw/arm/smmuv3: Introduce smmuv3_s1_range_inval() helper, Eric Auger, 2020/06/11
[PATCH RESEND 9/9] hw/arm/smmuv3: Advertise SMMUv3.2 range invalidation, Eric Auger, 2020/06/11