OpenBSD cvs log

created 2024-08-18T04:15:27Z
begin 2024-08-14T00:00:00Z
end 2024-08-15T00:00:00Z
path src/sys
commits 6

date 2024-08-14T10:54:58Z
author mglocker
files src/sys/dev/fdt/qcpmic.c log diff annotate
src/sys/dev/fdt/qcspmi.c log diff annotate
message In a qcspmi_cmd_read() error case, the register is only returning the error
bit, not SPMI_STATUS_DONE. Therefore, catch the error at the right place,
and print the specific error type.

ok patrick@

date 2024-08-14T13:54:08Z
author mvs
files src/sys/kern/kern_sysctl.c log diff annotate
src/sys/sys/kernel.h log diff annotate
message Make sysctl_int() and sysctl_int_lower() mp-safe and unlock KERN_HOSTID.

The only difference between sysctl_int() and sysctl_int_bounded()
is the range check, so sysctl_int() is just sysctl_int_bounded(...,
INT_MIN, INT_MAX). sysctl_int() is not the fast path, so this useless
check is not significant.

Mp-safe sysctl_int() is meaningless for sysctl_int_lower(), so rework it
in the sysctl_int_bounded() style. This time all affected paths are
kernel locked, but this doesn't make sysctl_int_lower() worse.

Change `hostid' type to the type of int. It only stored but never used
within kernel, userland accesses it through sysctl_int(). Nothing
changes, but variable becomes consistent with sysctl_int().

ok bluhm

date 2024-08-14T14:40:45Z
author patrick
files src/sys/arch/amd64/conf/GENERIC log diff annotate
src/sys/arch/amd64/conf/RAMDISK_CD log diff annotate
message Introduce qwz(4), a work-in-progress port of the Linux ath12k driver.

This driver is not working yet, it's a copy of qwx(4) which bit-by-bit will be
adjusted to work on the newer generation of chips. Even though this is only a
minor bump over the previous generation, the changes are large enough that
bringup, debugging and long-term maintenance would suffer trying to squash them
into a single driver. This can be reconsidered once we have reached a stable
state.

date 2024-08-14T14:40:46Z
author patrick
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
src/sys/conf/files log diff annotate
src/sys/dev/ic/qwz.c log diff annotate
src/sys/dev/ic/qwzreg.h log diff annotate
src/sys/dev/ic/qwzvar.h log diff annotate
src/sys/dev/pci/files.pci log diff annotate
src/sys/dev/pci/if_qwz_pci.c log diff annotate
message Introduce qwz(4), a work-in-progress port of the Linux ath12k driver.

This driver is not working yet, it's a copy of qwx(4) which bit-by-bit will be
adjusted to work on the newer generation of chips. Even though this is only a
minor bump over the previous generation, the changes are large enough that
bringup, debugging and long-term maintenance would suffer trying to squash them
into a single driver. This can be reconsidered once we have reached a stable
state.

date 2024-08-14T17:52:47Z
author mvs
files src/sys/kern/kern_sysctl.c log diff annotate
src/sys/kern/uipc_domain.c log diff annotate
src/sys/netmpls/mpls_raw.c log diff annotate
message Push kernel lock down to net_sysctl().

All except PF_MPLS paths are mp-safe:
- net_link_sysctl() and following net_ifiq_sysctl() only return
EOPNOTSUPP;
- uipc_sysctl() - mp-safe atomic access to integers;
- bpf_sysctl() - mp-safe atomic access to integers;
- pflow_sysctl() - returns statistics from per-CPU counters;
- pipex_sysctl() - mp-safe atomic access to integer;

Push kernel lock down to mpls_sysctl(). sysctl_int_bounded() do copying
with local variable, so context switch is safe. No need to wire memory
or take `sysctl_lock' rwlock(9).

Keep protocols locked as they was include pages wiring. Copying will not
sleep - no network slowdown while doing it with net lock held.

ok bluhm

date 2024-08-14T18:31:33Z
author bluhm
files src/sys/arch/amd64/amd64/bus_dma.c log diff annotate
src/sys/arch/amd64/include/bus.h log diff annotate
message Implement bounce buffering for AMD SEV in amd64 bus dma.

When running as SEV guest, as indicated by variable cpu_sev_guestmode,
allocate additional pages for each segment on dma map creation.
These pages are mapped with the PMAP_NOCRYPT attribute, i.e. the
crypt bit is not set in the PTE. Thus, these pages are shared with
the hypervisor.
When the map is loaded with actual pages, the address in the
descriptor is replaced by the corresponding bounce buffer. Using
bus_dmamap_sync(), data is copied from the encrypted pages used by
guest drivers to the unencrypted bounce buffers shared with the
hypervisor, and vice versa.
If the kernel is not running in SEV guest mode, which means as
normal host or non-SEV guest, no bounce buffers are used.

from hshoexer@; based on ancient code of mickey@; OK kettenis@