OpenBSD cvs log

created 2024-12-22T05:15:41Z
begin 2024-12-20T00:00:00Z
end 2024-12-21T00:00:00Z
path src/sys
commits 7

date 2024-12-20T03:31:09Z
author jmatthew
files src/sys/dev/pci/if_mcx.c log diff annotate
message Pass BUS_DMA_64BIT to bus_dmamem_alloc(). On amd64, this allows use of
memory past 4GB, potentially freeing up some low memory for more important
uses.

ok dlg@

date 2024-12-20T18:46:51Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Merge identical code paths to promote data to a new anon into a new function.

ok tb@, miod@

date 2024-12-20T18:49:37Z
author mpi
files src/sys/uvm/uvm_aobj.c log diff annotate
src/sys/uvm/uvm_vnode.c log diff annotate
message A shared lock is now enough to call pgo_get() functions iff PGO_LOCKED is given.

Update assertions to reflect that.

ok tb@, miod@

date 2024-12-20T18:54:12Z
author mpi
files src/sys/uvm/uvm_page.c log diff annotate
message Relax some uvm_page_owner_locked() assertions.

. uvm_pagewait(): do not require an exclusive lock to release it & sleep
. uvm_page{de,}activate(): lists updates are serialized by the `pageqlock' mutex

More assertions could be relaxed but only those 3 are necessary for running
the lower fault handler in parrallel.

ok miod@

date 2024-12-20T19:20:34Z
author bluhm
files src/sys/netinet/tcp_input.c log diff annotate
message Fix signed integer comparison in tcp mss.

In tcp_mss_adv() max(9) was used to guarantee that mss it not too
small. Unfortunately max() uses u_int and mss could get negative
in some error conditions.
Rearrange the code to directly return in case of errors. Also read
tcp_mssdflt only once to head towards atomic integer sysctl.

OK mvs@

date 2024-12-20T21:30:17Z
author bluhm
files src/sys/netinet/tcp_fsm.h log diff annotate
src/sys/netinet/tcp_timer.c log diff annotate
src/sys/netinet/tcp_timer.h log diff annotate
message Declare some global TCP variables constant.

OK mvs@

date 2024-12-20T22:18:27Z
author sf
files src/sys/dev/fdt/virtio_mmio.c log diff annotate
src/sys/dev/pci/virtio_pci.c log diff annotate
src/sys/dev/pv/if_vio.c log diff annotate
src/sys/dev/pv/vioblk.c log diff annotate
src/sys/dev/pv/viocon.c log diff annotate
src/sys/dev/pv/viogpu.c log diff annotate
src/sys/dev/pv/viomb.c log diff annotate
src/sys/dev/pv/viornd.c log diff annotate
src/sys/dev/pv/vioscsi.c log diff annotate
src/sys/dev/pv/virtio.c log diff annotate
src/sys/dev/pv/virtiovar.h log diff annotate
src/sys/dev/pv/vmmci.c log diff annotate
message virtio: Refactor attach logic

virtio 1.x requires that all queue setup, including the queue interrupt
vector, is done before setting the queue_enable register to 1. This
conflicts with how we do things right now:

* We implicitly make queue setup in virtio_alloc_vq(), which is called
from the child driver attach functions. This also sets queue_enable=1.

* Later, we allocate the interrupts and set the queue interrupt vectors
in the second half of the virtio transport attach functions.

This is a violation of a MUST from the standard and causes problems with
some hypervisors, in particular those that have no virtio 0.9 support,
which has no such ordering requirements.

To fix this:

* Move the interrupt allocation to a new virtio_attach_finish() function.
This does all queue setup, including the interrupt vectors.

* Don't call virtio_setup_queue() in virtio_alloc_vq() anymore.

* We can also move the setting of the DRIVER_OK flag into this function.
virtio_attach_finish() must be called before using any virtqueue or
writing any virtio config register.

While there,

* also streamline the attach error handling in all drivers.

* skip initially setting sc_config_change to NULL, the softc is
initialized to 0.

ok jan@
tested by bluhm@