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)
Wed, Jun 19, 10:03 AM
Unknown Object (File)
Fri, Jun 7, 10:21 AM
Unknown Object (File)
Wed, Jun 5, 9:20 AM
Unknown Object (File)
Mon, Jun 3, 8:56 PM
Unknown Object (File)
Wed, May 29, 12:39 AM
Unknown Object (File)
May 17 2024, 10:08 AM
Unknown Object (File)
May 17 2024, 9:01 AM
Unknown Object (File)
May 11 2024, 4:38 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.