Page MenuHomeFreeBSD

amd64: move gdt into pcpu
ClosedPublic

Authored by kib on Nov 10 2019, 10:56 AM.
Tags
None
Referenced Files
F82263618: D22302.id64233.diff
Sat, Apr 27, 2:36 AM
F82263578: D22302.id64235.diff
Sat, Apr 27, 2:35 AM
F82263576: D22302.id.diff
Sat, Apr 27, 2:35 AM
F82263477: D22302.id64144.diff
Sat, Apr 27, 2:34 AM
F82256279: D22302.diff
Sat, Apr 27, 12:58 AM
Unknown Object (File)
Dec 20 2023, 1:08 AM
Unknown Object (File)
Dec 12 2023, 2:36 PM
Unknown Object (File)
Nov 25 2023, 12:09 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.