History log of /openbsd/sys/arch/amd64/include/cpu_full.h (Results 1 – 5 of 5)
Revision Date Author Comments
# d9ff679e 17-May-2019 guenther <guenther@openbsd.org>

Oops, forgot to include a copyright year when originally added


# 99cec4a6 12-Sep-2018 guenther <guenther@openbsd.org>

Whitespace fixes


# 8a7a62cb 29-Mar-2018 guenther <guenther@openbsd.org>

Explicitly declare the gdt storage in struct cpu_info_full instead of
implicitly putting it in the padding to page-size. This eliminates a
couple Coverity issues from the Meltdown work.

testing dan

Explicitly declare the gdt storage in struct cpu_info_full instead of
implicitly putting it in the padding to page-size. This eliminates a
couple Coverity issues from the Meltdown work.

testing daniel@
ok mlarkin@

show more ...


# e6ef12fb 22-Feb-2018 bluhm <bluhm@openbsd.org>

The compile time assertion for cpu info did not work with gcc.
Rephrase the condition in a way that both gcc and clang accept it.
OK guenther@


# b767b017 21-Feb-2018 guenther <guenther@openbsd.org>

Meltdown: implement user/kernel page table separation.

On Intel CPUs which speculate past user/supervisor page permission checks,
use a separate page table for userspace with only the minimum of ker

Meltdown: implement user/kernel page table separation.

On Intel CPUs which speculate past user/supervisor page permission checks,
use a separate page table for userspace with only the minimum of kernel code
and data required for the transitions to/from the kernel (still marked as
supervisor-only, of course):
- the IDT (RO)
- three pages of kernel text in the .kutext section for interrupt, trap,
and syscall trampoline code (RX)
- one page of kernel data in the .kudata section for TLB flush IPIs (RW)
- the lapic page (RW, uncachable)
- per CPU: one page for the TSS+GDT (RO) and one page for trampoline
stacks (RW)

When a syscall, trap, or interrupt takes a CPU from userspace to kernel the
trampoline code switches page tables, switches stacks to the thread's real
kernel stack, then copies over the necessary bits from the trampoline stack.
On return to userspace the opposite occurs: recreate the iretq frame on the
trampoline stack, switch stack, switch page tables, and return to userspace.

mlarkin@ implemented the pmap bits and did 90% of the debugging, diagnosing
issues on MP in particular, and drove the final push to completion.
Many rounds of testing by naddy@, sthen@, and others
Thanks to Alex Wilson from Joyent for early discussions about trampolines
and their data requirements.
Per-CPU page layout mostly inspired by DragonFlyBSD.

ok mlarkin@ deraadt@

show more ...