Age | Commit message (Collapse) | Author |
|
To appease the clang 15 warning -Wdeprecated-non-prototype (turned on
by -Wall). ok millert@
|
|
New warning -Warray-parameter is a bit overzealous.
ok millert@
|
|
When booting guests with SeaBIOS, vmd(8) supplied details about the
available guest memory via CMOS registers. Consequently, we've been
carrying some patches in the ports tree to SeaBIOS to fetch this
information like it's the 1990s.
When a vm initializes memory ranges, we now track what each range
represents. This information can be used to supply the e820 memory
map to SeaBIOS via the fw_cfg interface allowing it to properly
communicate memory ranges to a guest operating system. (This will
also allow us to drop some patches from the port.)
Given the ranges can now be marked with a purpose, this also allows
vmm(4) to switch from hard-coded mmio ranges and instead let the
information on the memory range dictate if vmm should be handling
a page fault or sending to vmd for a memory assist.
Tested by Mischa Peters and others. OK mlarkin@.
|
|
ok millert@
|
|
interrupt enable register; this used to be true more than 20 years ago but
the interrupt code has changed a lot since, and it is nevertheless bad
practice from md drivers to know to much about spl*() return values.
The check should become a "spl >= IPL_TTY", but management of the
adb_polling variable is good enough to need this at all.
|
|
input on adb machines.
|
|
|
|
makes the USB ports work after a suspend/resume cycle on the x13s.
ok kettenis@
|
|
this the SFP port on the ClearFog Base (CN9130) starts to work, as the SFP
slot has some GPIOs routed through a GPIO extender.
ok dlg@ kettenis@
|
|
the hash generated when setting up the pf pdesc struct uses outer
addresses, while the addresses used in the state table goes through
pf_state_key_addr_setup(), which does interesting things with some
ipv6 icmp values. state lookups used pf_state_key_addr_setup(), but
pf_state_key_setup copied the pdesc value, causing an inconsistency.
pf_state_key_setup now calls pf_state_key_addr_setup().
found by anton@
tested by anton@ florian@
|
|
ok deraadt@
|
|
kernel bootstrap phase and when booting the secondary CPUs. This avoids
accidentally mapping memory regions that should not be mapped (i.e. secure
memory) as all mapped memory can be accessed speculatively.
To allow the kernel to be loaded at arbitrary physical addresses (and
arbitrary virtual addresses in the future) make sure the code that builds
the page tables can handle mapping a block of memory that straddles a
1GB or 512GB boundary. This involves using two pagetable pages at all
levels except the top level and changing the link_l1_pagetable function
to accept an entry count just like link_l0_pagetable already does.
ok patrick@
|
|
Stop session protection before tearing down firmware state after failure
to authenticate. Firmware will panic if we remove the MAC/PHY binding
while session protection is active.
test + ok kevlo@
|
|
anton@ says the previous commit breaks ipv6 related regress tests.
disabling the use of the hash in the state key compare gets it going
again while i can figure out what's going on.
|
|
|
|
In some cases, stickcmpr_set() fails to ensure that %STICK_CMPR leads
%STICK before returning to the caller. Rewriting the retry logic in C
trivially fixes the issue. So move the retry logic out into a new
function, stick_rearm().
Issue discovered by miod@, fix tested by miod@.
Link: https://marc.info/?l=openbsd-tech&m=167122933414238&w=2
ok kettenis@
|
|
ok patrick@
|
|
the hash will be used to partition work in pf and pfsync in the
future, and right now it is used as the first comparison in the rb
tree state lookup.
using stoeplitz means that pf will hash traffic the same way that
hardware using a stoeplitz key will hash incoming traffic on rings.
stoeplitz is also used by the tcp stack to generate a flow id, which
is used to pick which transmit ring is used on nics with multiple
queues too. using the same algorithm throughout the stack encourages
affinity of packets to rings and softnet threads the whole way
through.
using the hash as the first comparison in the state rb tree comparison
should encourage faster traversal of the state tree by having all
the address/port bits summarised into the single hash value. however,
tests by hrvoje popovski don't show performance changing. on the
plus side, if this change is free from a performance point of view
then it makes the future steps more straightforward.
discussed at length at h2k22
tested by sashan@ and hrvoje popovski
ok tb@ sashan@ claudio@ jmatthew@
|
|
|
|
ok kettenis@
|
|
we only have wakeup interrupts enabled, all others are disabled.
ok kettenis@
|
|
DVACT_SUSPEND/DVACT_RESUME handling and push it into the MD code that
handles "suspend-to-idle". This way a failure in DVACT_SUSPEND handling
will not result in hosed interrupts on the primary interrupt controller
if we abort the suspend operation.
requested by deraadt@
ok patrick@
|
|
OK miod
|
|
process. Use this information to access the vector.
OK mpi@ mbuhl@ deraadt@
|
|
|
|
|
|
|
|
This fixes a panic seen by Geoff Steckel on RTL8125 with MCLGETL.
Tested by Geoff Steckel and Nick Owens.
ok dlg@
|
|
this makes searching for the struct members easier, which in turn
makes tweaking code around them a lot easier too. sk_refcnt in
particular would have been a lot nicer to fiddle with than just
refcnt because pf_state structs also have a refcnt, which is annoying.
tweaks and ok sashan@
reads ok kn@
|
|
Under _KERNEL, dead since 2011 r1.100
Simplify softraid(4) to behave like other HBAs [...]
OK krw
|
|
This prevents the kernel from crashing when a ugen(4) device is detached
while kqueue still holds a reference to that device.
Crash reported and fix tested by xavier.s on bugs@.
OK mpi@
|
|
|
|
the idea is that access to vmm from userland is gated by the vmm_softc
sc_status field, and then accounted for by the refcnt. you take a read
lock to check the gate, and if it is open then you can take a reference
and do your thing. once you've finished the work then you rele the
refcnt on the way out of the ioctl handler.
the suspend code takes a write lock to close the sc_status gate,
and then uses refcnt_finalise to wait for things in the ioctl handler
to get out.
on resume, the code takes the write lock, sets the refcnt up again for
userland to use, and then opens the gate.
tested by and ok dv@
|
|
both of these are kernel private data structures and do not need
to be visible to userland. moving them to pfvar_priv.h makes this
explicit, and makes it leass scary to tweak them in the future.
ok deraadt@ kn@ sashan@
|
|
state changes are reported. That's the 6th bit, so switch to hex
constants. Adjust #if tests for consistency
ok kettenis@
|
|
|
|
|
|
According to the "Efficeon BIOS Programmers Guide", the Efficeon
processor has a virtual north bridge that can communicate with the
south bridge over HyperTransport (device 0x0060) and with the
graphics controller over an AGP bridge (device 0x0061).
ok jsg@
|
|
This occurs the kernel has booted from old boot loader or directly
booted by command line parameter on emulator.
Tested by LUNA-88K2 and nono emulator.
|
|
bioctl(8)'s -d has no sanity checks and happily "deletes" any volume,
whether currently in use or not.
For now, refuse to detach the boot volume as a (too) simple safety guard,
until proper logic around mounted file systems on top is implemented.
Found the hard way through "bioctl -d sd1" with sd1 hosting /, after which
it took both fsck(8) and installboot(8) from a miniroot USB to recover.
regress/sys/dev/softraid also triggers it if root is on softraid.
OK claudio op jsing
|
|
|
|
ok jsg@
|
|
resulting interrupt storm. It's causing bad system performance, and breaks
the installer.
|
|
|
|
struct uvm_map's .addr is protected by the map's lock and .{min,max}_offset
are immutable.
uvm_map_inherit() locks the VM map upon entry, sets the desired inheritance
mode for the given address range (validated outside the lock) and unlocks
the map itself.
fork(2), i.e. uvm_mapent_forkcopy(), first locks both old and new maps and
then copies entries over as per the inheritance type.
futex(2), another user of struct vm_map_entry's .inheritance member, also
locks the map accordingly.
OK mpi
|
|
ok patrick@
|
|
requires word-sized access.
ok patrick@
|
|
cookie it received from establishing the interrupt.
|
|
Same fix as for iwx(4) in CVS commit YakAvDYHWiUF3c4m, r1.113 if_iwx.c.
ok deraadt, mpi
|
|
pf_state structures don't contain ip addresses, protocols, ports,
etc. that information is stored in a pf_state_key struct, which is
used to wire a state into the state table. when things like pfsync
or the pf state ioctls want to export information about a state,
particularly the addresses on it, they needs the pf_state_key struct
to read from.
before this diff the code assumed that when a state was removed
from the state tables it could throw the pf_state_key structs away
as part of that removal. this code changes it so once pf_state_insert
succeeds, a pf_state will keep its references to the pf_state_key
structs until the pf_state struct itself is being destroyed.
this allows anything that holds a reference to a pf_state to also
look at the pf_state_key structs because they're now effectively
an immutable part of the pf_state struct.
this is by far the simplest and most straightforward fix for pfsync
crashing on pf_state_key dereferences we've come up with so far.
it has been made possible by the addition of reference counts to
pf_state and pf_state_key structs, which allows us to properly
account for this adjusted lifecycle for pf_state_keys on pf_state
structs.
sashan@ and i have been kicking this diff around for a couple of
weeks now.
ok sashan@ jmatthew@
|