Page MenuHomeFreeBSD

Generalise the arm64 ASID allocator
ClosedPublic

Authored by andrew on Feb 25 2020, 12:04 PM.
Tags
None
Referenced Files
F135886534: D23831.id.diff
Thu, Nov 13, 9:14 PM
F135883644: D23831.id68800.diff
Thu, Nov 13, 8:31 PM
Unknown Object (File)
Thu, Nov 13, 10:02 AM
Unknown Object (File)
Thu, Nov 13, 3:55 AM
Unknown Object (File)
Mon, Nov 10, 10:36 AM
Unknown Object (File)
Mon, Nov 3, 6:32 PM
Unknown Object (File)
Mon, Nov 3, 5:54 PM
Unknown Object (File)
Fri, Oct 31, 9:30 AM
Subscribers

Details

Summary

The requirements of an Address Space ID allocator and a Virtual Machine ID
allocator are similar. Generalise the former code so it can be used with
the latter.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Remove an unused variable

Is your overall strategy to incrementally replace PMAP_ASSERT_STAGE1(pmap)'s by correct handling of stage 2 PTE?

sys/arm64/arm64/pmap.c
998 ↗(On Diff #68800)

I would suggest moving the second sentence inside pmap_init_asids() and change the wording to: "We may be too early in ..."

5882 ↗(On Diff #68800)

if (pmap->pm_stage == PM_STAGE1) ... else ...?

This revision is now accepted and ready to land.Feb 25 2020, 4:50 PM
In D23831#523873, @alc wrote:

Is your overall strategy to incrementally replace PMAP_ASSERT_STAGE1(pmap)'s by correct handling of stage 2 PTE?

Yes. I'm currently working on pmap_enter and just need to implement cache and tlb handling for it.

sys/arm64/arm64/pmap.c
5882 ↗(On Diff #68800)

I'll add PMAP_ASSERT_STAGE1(pmap); for now as the process for VMID reset looks like it will be more complex, e.g. may need to call into the hypervisor.

  • Move a comment to follow code into pmap_init_asids
  • Assert we have a Stage 1 pmap in pmap_reset_asid_set and remove extra whitespace
This revision now requires review to proceed.Feb 25 2020, 7:06 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 26 2020, 11:50 AM
This revision was automatically updated to reflect the committed changes.