On 10/21/26 14:20, Richard Henderson wrote:
> In particular, arm requires the complete address, including tagging, to
> be available for any raised exception.  So clipping the address at any
> other place loses that information.  Dunno if that applies to LAM.

It doesn't for LAM. LAM masking applies before paging, so CR2 gets
the masked address (ISE 319433-048, section 6.5). The non-canonical
case riases #GP, which doesn't report an address.

One change would touch common code: tlb_flush_range_locked() compares
large_page_addr in all 64 bits, so INVLPG of the untagged address
misses a large page entered under a tagged alias. I'd compare under
the flush mask:

    if (((addr + len - 1) & d->large_page_mask & mask) ==
        (d->large_page_addr & mask)) {

If that's fine, I'll post the system-mode series.

On Wed, Oct 21, 2026 at 6:20 AM Richard Henderson
<[email protected]> wrote:
>
> On 10/21/26 12:57, mdspan wrote:
> > Ping.
> >
> > Paolo, Richard: does masking in get_physical_address(), with TLB
> > entries kept per tag and INVLPG flushing all aliases through
> > tlb_flush_page_bits_by_mmuidx(), look acceptable to you? I have a
> > prototype of items 1 and 2 and can post it as an RFC series if that
> > would be easier to review.
>
> Yes, this is what we do in target/arm for top-byte-ignore.
>
> In particular, arm requires the complete address, including tagging, to
> be available for any raised exception.  So clipping the address at any
> other place loses that information.  Dunno if that applies to LAM.
>
> r~

Reply via email to