Page MenuHomeFreeBSD

amd64: move gdt into pcpu
ClosedPublic

Authored by kib on Nov 10 2019, 10:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 4, 4:44 PM
Unknown Object (File)
Wed, May 8, 8:49 PM
Unknown Object (File)
May 6 2024, 11:02 AM
Unknown Object (File)
Apr 27 2024, 2:36 AM
Unknown Object (File)
Apr 27 2024, 2:35 AM
Unknown Object (File)
Apr 27 2024, 2:35 AM
Unknown Object (File)
Apr 27 2024, 2:34 AM
Unknown Object (File)
Apr 27 2024, 12:58 AM

Diff Detail

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

Event Timeline

sys/amd64/amd64/pmap.c
1782 ↗(On Diff #64144)

Why does GSBASE need to be set again?

sys/amd64/amd64/pmap.c
1782 ↗(On Diff #64144)

Because lgdt() != LGDT, it reloads %gs. I could have used bare_lgdt(), but think that we better reload there segment cache as well, actually.

Just an update: I'm at test number 534 out of 677 with an uptime of 20 hours (tests are sorted by increasing run time).
No problems so far.

I wish one could use PCPU_GET(gdt) instead of *PCPU_PTR(gdt) to look more readable, but I understand why we can't do that.

I ran the full stress2 test using 64144. No problems seen.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 12 2019, 3:47 PM
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state Needs Review.Nov 12 2019, 3:51 PM
Closed by commit rS354646: amd64: move GDT into PCPU area. (authored by kib). · Explain Why
This revision was automatically updated to reflect the committed changes.