On 4/28/22 11:26, Peter Maydell wrote:
> On Thu, 28 Apr 2022 at 09:37, Eric Auger <eric.au...@redhat.com> wrote:
>> On 4/26/22 18:04, Peter Maydell wrote:
>>> TLB invalidation correctly removes all TLB entries matching
>>> the specified address or address range (unless the guest specifies the
>>> leaf level explicitly, in which case it gets what it asked for). So we
>> "
>>
>> unless the guest specifies the
>> leaf level explicitly, in which case it gets what it asked for
>>
>> "
>> This is the less obvious part as the spec says:
>>
>> "A TLB invalidation operation removes all matching TLB entries even if
>> overlapping entries exist for a given
>> address."
>>
>> I failed to find further precisions about the range invalidation & BBML.
> If the invalidate says "level 2" then a TLB entry that wasn't
> put in at level 2 doesn't match the TLB invalidate request and so
> isn't removed (whether it overlaps a matching one at the same
> address or not). This is defined as part of the behaviour of TLB
> invalidates which specify a TTL, eg on page 142.
>
> An implementation which did something like "find the first entry
> that matches the address, then notice that it doesn't match
> the specified TTL, so ignore it and do nothing" wouldn't be
> correct. But "invalidate all the entries which match for
> both address and TTL and ignore the ones which don't match
> on TTL" is fine.
OK Thanks
Eric
>
>> If you are confident about this, it looks good to me.
>> Reviewed-by: Eric Auger <eric.au...@redhat.com>
> Thanks.
>
> -- PMM
>