Page MenuHomeFreeBSD

arm64 pmap: Handle kernel mappings in pmap_remove_l2().
ClosedPublic

Authored by markj on Nov 13 2018, 7:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 9:24 AM
Unknown Object (File)
Wed, Nov 13, 12:05 AM
Unknown Object (File)
Tue, Nov 12, 4:05 PM
Unknown Object (File)
Mon, Nov 11, 12:06 PM
Unknown Object (File)
Sun, Nov 10, 5:24 PM
Unknown Object (File)
Oct 24 2024, 6:47 PM
Unknown Object (File)
Oct 23 2024, 2:09 AM
Unknown Object (File)
Sep 21 2024, 5:34 AM
Subscribers

Details

Test Plan

Only compile-tested so far.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20797
Build 20193: arc lint + arc unit

Event Timeline

  • Ensure that the existing mapping was destroyed.
  • Fix KASSERT() format string.
markj added reviewers: andrew, alc, kib.
sys/arm64/arm64/pmap.c
2412

This is the 'break before make', right ? Might be mention the term in the comment above ?

So what would happen with the parallel accesses to the l2 range meantime ?

2417

... or kernel.

markj added inline comments.
sys/arm64/arm64/pmap.c
2412

Right, the "break" happens in pmap_remove_l2(). I'll update the comment here.

I believe it will cause a data abort. As we discussed in email, I believe this can already happen with pmap_demote_l2(). My intent here is to fix the problem with superpages in exec_map, which is pageable.

markj marked an inline comment as done.
  • Address kib's feedback.
This revision is now accepted and ready to land.Nov 14 2018, 8:10 PM
sys/arm64/arm64/pmap.c
2401

I think that this should just be

newl2 = ml3pa | L2_TABLE;

Aside from my one comment, this looks fine. Once that comment is addressed, consider this change "Accepted" by me.

andrew added inline comments.
sys/arm64/arm64/pmap.c
2401

Yes. ATTR_DEFAULT and ATTR_IDX are only needed on last level entries. The bits they set are ignored on table entries.

  • Remove flags that don't make sense for a table descriptor.
This revision now requires review to proceed.Nov 15 2018, 5:24 PM
This revision is now accepted and ready to land.Nov 15 2018, 5:25 PM
This revision was automatically updated to reflect the committed changes.