[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries
From: |
Peter Maydell |
Subject: |
Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries |
Date: |
Tue, 30 Jun 2020 16:50:18 +0100 |
On Fri, 26 Jun 2020 at 14:53, Auger Eric <eric.auger@redhat.com> wrote:
> On 6/25/20 5:30 PM, Peter Maydell wrote:
> > Rather than looping around doing multiple hash table lookups like
> > this, why not just avoid including the tg and level in the
> > key equality test?
> >
> > If I understand the range-based-invalidation feature correctly,
> > the only time we care about the TG/LVL is if we're processing
> > an invalidate-range command that specifies them. But in that
> > case there should never be multiple entries in the bs->iotlb
> > with the same iova, so we can just check whether the entry
> > matches the requested TG/LVL once we've pulled it out of the
> > hash table. (Or we could architecturally validly just blow
> > it away regardless of requested TG/LVL -- they are only hints,
> > not required-to-match.)
>
> This change could have been done independently on the RIL feature. As we
> now put block entries in the IOTLB , when we look for an iova
> translation, the IOVA can be mapped using different block sizes or using
> page entries. So we start looking at blocks of the bigger size (entry
> level) downto the page, for instance 4TB/512MB/64KB. We cannot know
> which block and size the address belongs to.
Yes, but we wouldn't need to care which TG and LVL the
address belongs to if we didn't put them into
the key, would we? I'm probably missing something here, but
just because the hardware might want to use the hints in
the invalidation-command about TG and LVL doesn't inherently
mean QEMU is most efficient if it cares about the hints.
thanks
-- PMM
- Re: [PATCH RESEND 3/9] hw/arm/smmu: Simplify the IOTLB key format, (continued)
- [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
- [PATCH RESEND 8/9] hw/arm/smmuv3: Get prepared for range invalidation, Eric Auger, 2020/06/11