| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok deraadt, pd, phessler
|
|
|
|
| |
ok visa@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is mostly based on the stuff kettenis did on arm64 recently.
msix support is basically the same as msi support from the host
side, you just have to tell the actual device about the msi vectors
differently.
the most complicated part of this is storing the requested msix
vector between the call to pci_intr_map_msix and pci_intr_establish.
the pci_intr_handle_t for storing state between those is a scalar
type, so we reassign some bits in that int for use storing the type
of int (intx, msi, or msix) and the vector.
i took the low 8 bits for storing the vector, which gives us a max
of 256 values. technically msix supports up to 2048 vectors, but
pyro only supports 256 in total, so i don't think we're going to
miss out on much. vpci may support more, but we'll cross that bridge
when we get to it.
i tested pyro(4) with mcx(4).
vpci was tested by kettenis@
ok kettenis@
|
|
|
|
|
|
|
| |
It doesn't matter in this case and reducing the number of PUSER makes
the scheduler logic easier to understand.
ok kettenis@, visa@
|
|
|
|
|
|
| |
created with the BUS_DMA_64BIT flag.
ok jsg@
|
|
|
|
|
|
|
| |
larger than 256KB not 128KB to cope with the 06-8e-09 microcode which is
currently 193KB.
Reported and tested by Paul de Weerd. Matches a diff from claudio@
|
|
|
|
| |
written by Cody Cutler <ccutler at csail.mit.edu>
|
|
|
|
| |
tested by and ok patrick@
|
|
|
|
|
|
|
|
|
| |
systems. There is no guarantee that the TSCs on different cores are
synchronized when the OpenBSD kernel boots and we don't have code to
synchronize them ourselves. This affects both AMD and Intel CPUs and
even cores on the same socket can by out of sync.
ok deraadt@, sthen@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
Makes MSI/MSI-X actually work reliably on machines with agintc(4).
ok patrick@
|
|
|
|
|
|
|
|
| |
implements mapping of MSI and MSI-X interrupts with new generic functions.
Fixes a use-after-free in sone PCI device drivers that call pci_intr_string(9)
after pci_intr_establish(9).
ok deraadt@
|
|
|
|
|
|
|
|
|
| |
Lookup the address that a syscall instruction is executed from, and kill
the process if that page is writeable. This brings an aspect of W^X
behaviour to W|X mappings (in JITs not yet adapted to W^X). The goal is
to remove simple attack methods and force use of ret2libc or other more
complicated means.
ok kettenis stefan visa
|
|
|
|
|
|
|
|
|
| |
we need KVA to keep track of all the RAM pages, machines with a lot
of memory easily exhaust our KVA space. We need about 1G of KVA
per 32G of memory, so with 16G of KVA we can maintain close to 512G
of memory.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
| |
because we don't have enough kernel memory available in the early bootstrap
phase to allocate the vm_page structures. Fix this by making uvm_growkernel()
work before uvm is initialized like we do on other architectures that don't
use a direct map and explicitly call it after enumerating the available
physical memory with an estimate of how much KVA we need to initialize uvm.
ok patrick@
|
|
|
|
| |
ok kettenis@
|
| |
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
| |
a new pci_machdep.c file such that it can be re-used by other arm64
PCI host bridge drivers in the future.
ok patrick@
|
|
|
|
|
|
|
|
|
| |
message address into an MSI-X table entry. The RTL8168/RTL8111 hardware
does not respond to 64-bit access (reads return all-ones, writes are
ignored) and the PCI specification documents separate 32-bit "DWORD"
fields for message address and message upper address.
ok mlarkin@, jmatthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the kernel, which is allocated in low memory by efiboot, is not in
the same 512 GiB L0 address space as the EFI/FDT/ACPI tables. Since
we only identity-map a single L0 entry for bootstrapping purposes we
can't reach those tables. Keep a set of spare L1 tables, currently
one, which we can dynamically enter into the identity map so that we
are able to reach those tables. While there, do the FDT mapping a
bit later in C code by calling pmap_map_early(). This allows us to
boot further on Packet's Ampere eMAGs.
Discussed with drahn@
ok kettenis@
|
|
|
|
|
|
|
| |
either hardware update (RDCL_NO) or our being nested in a VM which is
handling the flushing via the L1D_FLUSH MSR.
ok mlarkin@
|
|
|
|
|
|
| |
as it enhances the L1D_FLUSH MSR to flush MDS too
ok mlarkin@
|
|
|
|
|
|
|
|
|
| |
Refactoring to remove 'long_kernel' variable and consistent use of 'entry'
and 'marks[MARK_ENTRY]'. Prompted by guenther@. No functional change.
tested by jca@ and myself
ok guenther@, kettenis@
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
| |
has broken the tree once again.
ok kettenis
|
|
|
|
|
|
|
| |
prefetchable and "normal" mmio at the host bridge level we can simply pass
the same extent.
ok patrick@
|
|
|
|
| |
ok mpi@
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The APM spec defines an APM_UPDATE_TIME event that is meant to cause
the driver to rebase the system's wallclock against the RTC. The
event itself is apparently caused by occasional blackout periods where
interrupts cannot be delivered, which might cause the system to miss a tick.
The problem is that on systems where these events are frequent this
constantly erodes the system wallclock. The RTC is not the greatest
clock in the world so these systems are always playing catch-up.
ntpd(8) is a far better clock corrector than rebasing against the RTC,
so it should be safe to simply ignore the event. We continue to record
the event for userspace listeners, but we do not call inittodr(9) on
receipt of the event.
Linux has ignored the event since v2.6.21:
https://github.com/torvalds/linux/commit/c1d370e167d66b10bca3b602d3740405469383de#diff-d85b9a44da8e5dfb2fb1bcbd304c2a6c
Discovered by jcs@. Discussed a bit with jcs@, tedu@, deraadt@. Fix
tested by jcs@.
"I think we should ignore the event" deraadt@
|
|
|
|
|
|
|
|
|
|
| |
allocation service to allocate a block of memory below 16MB such that there
is no risk of overwriting it when the bootloader moves the kernel in place.
It removes the 128k limit that was previously there.
Based on an earlier diff by patrick@
ok mlarkin@
|
|
|
|
|
|
|
| |
committing now so this can be worked on in tree
Thanks to the OpenBSD Foundation for sponsoring this work and kettenis@
for helping.
|
|
|
|
|
|
|
|
| |
the RDCL_NO bit of the ARCH_CAPA msr only indicates one of the MDS
subissues is mitigated; only the MDS_NO bit indicates they're all
mitigated.
ok jsg@ mlarkin@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
This diff adds support to be able to load a randomly linked kernel VA
(subject to some range restrictions). This change has been in snaps for
a few days without any fallout.
ok deraadt@
|
|
|
|
|
|
|
| |
stage does not need execute access, so map the page initially with
read-write protection.
OK miod@
|
|
|
|
|
|
|
|
|
|
|
| |
invalidation is done by mips64 pmap when the branch emulation page is
made executable.
Originally, the pmap_proc_iflush() call was necessary. The instruction
cache invalidation was added in pmap_protect() after the FPU emulation
was introduced.
OK miod@
|
|
|
|
| |
From miod@
|
|
|
|
| |
'looks good' kettenis@
|
|
|
|
|
|
|
|
|
| |
Emulate kvm pvclock in vmm(4). Compatible with pvclock(4) in OpenBSD. Linux
does not attach to this (yet).
Fixes by reyk@ and tested extensively by reyk@, tb@ and phessler@
ok mlarkin@ phessler@ reyk@
|
| |
|
|
|
|
|
|
|
| |
commit to unbreak the build.
from kettenis@
ok drahn@
|
|
|
|
|
|
| |
cpu_idle_cycle()
ok mpi@ kettenis@
|
| |
|