<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/arch/amd64/include/cpu.h, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/amd64/include/cpu.h?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/amd64/include/cpu.h?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2020-06-03T06:54:04Z</updated>
<entry>
<title>let the random subsystem read the tsc for event "timestamps".</title>
<updated>2020-06-03T06:54:04Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-06-03T06:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b8f1c15c74bab3fdc46349a15171114bcc56e562'/>
<id>urn:sha1:b8f1c15c74bab3fdc46349a15171114bcc56e562</id>
<content type='text'>
</content>
</entry>
<entry>
<title>introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.</title>
<updated>2020-05-31T06:23:56Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-05-31T06:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=01802d2cc63d886227ab3b39e923ff13cf516166'/>
<id>urn:sha1:01802d2cc63d886227ab3b39e923ff13cf516166</id>
<content type='text'>
rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it doesn't
use nanotime to get a monotonically increasing set or ordered and
accurate timestamps, it just wants something with bits that change.

there's been discussions for years about letting rnd use a clock
that's super fast to read, but not necessarily accurate, but it
wasn't until recently that i figured out it wasn't interested in
time at all, so things like keeping a fast clock coherent between
cpu cores or correct according to ntp is unecessary. this means we
can just let rnd read the cycle counters on cpus and things will
be fine.  cpus with cycle counters that vary in their speed and
arent kept consistent between cores may even be desirable in this
context.

so this is the first step in converting rnd.c to reading cycle
counter. it copies the nanotime backend to each arch, and they can
replace it with something MD as a second step later on.

djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits.
thanks to visa for his eyes.
ok deraadt@ visa@
deraadt@ says he will help handle any MD fallout that occurs.
</content>
</entry>
<entry>
<title>Use the same inittodr()/resettodr() implementation as on arm64/armv7/sparc64</title>
<updated>2020-04-28T12:58:27Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2020-04-28T12:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6905cb4ab37f6b72270043235ae0ebbc5033bf6a'/>
<id>urn:sha1:6905cb4ab37f6b72270043235ae0ebbc5033bf6a</id>
<content type='text'>
and move it to the end of machdep.c.  Rework the actual implementation
for te MC14818 compatible RTC into something that can be used as a todr_handle.

ok mpi@
</content>
</entry>
<entry>
<title>Remove unused protoype.</title>
<updated>2020-04-15T16:38:24Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2020-04-15T16:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=49989bafd49f1d77c5079478172fd81eddb48b5d'/>
<id>urn:sha1:49989bafd49f1d77c5079478172fd81eddb48b5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Disable TSX when MSR_ARCH_CAPABILITIES sets TSX_CTRL.</title>
<updated>2019-12-20T07:49:31Z</updated>
<author>
<name>jsg</name>
<email>jsg@openbsd.org</email>
</author>
<published>2019-12-20T07:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b8e34f5347d9abe26f72a6396eb3ca95ece63c26'/>
<id>urn:sha1:b8e34f5347d9abe26f72a6396eb3ca95ece63c26</id>
<content type='text'>
Even with the latest microcode this is not set on all CPUs with TSX, but
is set on CPUs which don't need MDS mitigations.

MDS mitigations also mitigate TSX Asynchronous Abort (TAA) but aren't
done if the CPU claims to not be affected by MDS (MDS_NO).
According to "Deep Dive: Intel Transactional Synchronization Extensions
(Intel TSX) Asynchronous Abort" CPUs requiring additional mitigations
for this are:
06-8e-0c	Whiskey Lake (ULT refresh)
06-55-0{6,7}	2nd Gen Xeon Scalable Processors based on Cascade Lake
06-9e-0d	Coffee Lake R

Currently TSX is disabled unconditionally when possible even if TAA_NO
is set.

ok bluhm@ guenther@ deraadt@
tested by bluhm@ on i5-8365U (06-8e-0c).
</content>
</entry>
<entry>
<title>Add TSC synchronization for multiprocessor machines.</title>
<updated>2019-08-09T15:20:04Z</updated>
<author>
<name>pirofti</name>
<email>pirofti@openbsd.org</email>
</author>
<published>2019-08-09T15:20:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8d9f4b32f43f4b9aeb465c2f55b56a13d021b7d8'/>
<id>urn:sha1:8d9f4b32f43f4b9aeb465c2f55b56a13d021b7d8</id>
<content type='text'>
CPU0 is the reference clock and all others are skewed. During CPU
initialization the clocks synchronize by keeping a registry of each CPU
clock skewness and adapting the TSC read routine accordingly.

This commit also re-enables TSC as the default time source.

Future work includes MSR-based synchronization via IA32_TSC_ADJUST
and perhaps adding a task that is executed periodically to keep the
clocks in sync in case they drift apart.

Inspired from NetBSD.
Tested by many and thoroughly reviewed by kettenis@, thank you!

OK kettenis@, deraadt@
</content>
</entry>
<entry>
<title>Mitigate Intel's Microarchitectural Data Sampling vulnerability.</title>
<updated>2019-05-17T19:07:15Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2019-05-17T19:07:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=a0dcb1783e6fe75c0d3cc06802415d3e715ac53b'/>
<id>urn:sha1:a0dcb1783e6fe75c0d3cc06802415d3e715ac53b</id>
<content type='text'>
If the CPU has the new VERW behavior than that is used, otherwise
use the proper sequence from Intel's "Deep Dive" doc is used in the
return-to-userspace and enter-VMM-guest paths.  The enter-C3-idle
path is not mitigated because it's only a problem when SMT/HT is
enabled: mitigating everything when that's enabled would be a _huge_
set of changes that we see no point in doing.

Update vmm(4) to pass through the MSR bits so that guests can apply
the optimal mitigation.

VMM help and specific feedback from mlarkin@
vendor-portability help from jsg@ and kettenis@
ok kettenis@ mlarkin@ deraadt@ jsg@
</content>
</entry>
<entry>
<title>Delete cpu_idle_{enter,leave}_fcn() as unused.  Add RETGUARD checks to</title>
<updated>2019-05-12T22:23:38Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2019-05-12T22:23:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f7a56ef1360d3ad003d116f7914fb30bc1a02760'/>
<id>urn:sha1:f7a56ef1360d3ad003d116f7914fb30bc1a02760</id>
<content type='text'>
cpu_idle_cycle()

ok mpi@ kettenis@
</content>
</entry>
<entry>
<title>Add a pwraction sysctl that controls what the power button does on acpi.</title>
<updated>2019-01-19T20:45:06Z</updated>
<author>
<name>tedu</name>
<email>tedu@openbsd.org</email>
</author>
<published>2019-01-19T20:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e9721e4882a991481e5af5fdf9238b40ca429ecb'/>
<id>urn:sha1:e9721e4882a991481e5af5fdf9238b40ca429ecb</id>
<content type='text'>
By default, nothing changes -- shutdown is initiated. But allows turning
power button into a sleep button if desired.
(grudging) ok from a few parties
</content>
</entry>
<entry>
<title>Include srp.h where struct cpu_info uses srp to avoid erroring out when</title>
<updated>2018-12-05T10:28:21Z</updated>
<author>
<name>jsg</name>
<email>jsg@openbsd.org</email>
</author>
<published>2018-12-05T10:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1a1181a966226532433438cb3741ae7cdc0727d4'/>
<id>urn:sha1:1a1181a966226532433438cb3741ae7cdc0727d4</id>
<content type='text'>
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.

ok visa@
</content>
</entry>
</feed>
