diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-08-21 19:04:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-08-21 19:04:41 +0000 |
commit | bbe24b8a6435ed021850aef245dac178cddeb5f0 (patch) | |
tree | 12720d8432644b538186f078195eb799385f4c91 /sys/arch/amd64/include/cpu.h | |
parent | c32fef6e3976c7293b1ef91b9faccd0f1834c77c (diff) |
Perform mitigations for Intel L1TF screwup. There are three options:
(1) Future cpus which don't have the bug, (2) cpu's with microcode
containing a L1D flush operation, (3) stuffing the L1D cache with fresh
data and expiring old content. This stuffing loop is complicated and
interesting, no details on the mitigation have been released by Intel so
Mike and I studied other systems for inspiration. Replacement algorithm
for the L1D is described in the tlbleed paper. We use a 64K PA-linear
region filled with trapsleds (in case there is L1D->L1I data movement).
The TLBs covering the region are loaded first, because TLB loading
apparently flows through the D cache. Before performing vmlaunch or
vmresume, the cachelines covering the guest registers are also flushed.
with mlarkin, additional testing by pd, handy comments from the
kettenis and guenther peanuts
Diffstat (limited to 'sys/arch/amd64/include/cpu.h')
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index d345dd9ca64..7b4ea642b28 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.126 2018/07/11 20:07:55 guenther Exp $ */ +/* $OpenBSD: cpu.h,v 1.127 2018/08/21 19:04:40 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -71,6 +71,7 @@ struct vmx { uint32_t vmx_msr_table_size; uint32_t vmx_cr3_tgt_count; uint64_t vmx_vm_func; + uint8_t vmx_has_l1_flush_msr; }; /* |