| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Broadcom's MPT-Fusion version 4 driver only works on 64-bit systems, and
has only been tested in amd64 and aarch64, so move it's building to just
those. I didn't notice this in the review and neglected to test those
cases (since I knew it didn't work there, so was a blind spot).
Pointy-hat: imp
Fixes: 9cdd40759617
Sponsored-by: Netflix
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Registered the mpi3mr driver source files in sys/conf/files, enabling it
to be compiled into the base kernel image. This matches the approach
used for existing Broadcom drivers such as mrsas, mps, and mpr.
Add mpi3mr to sys/conf/NOTES.
With this change, the mpi3mr driver will be built as part of the base
kernel, allowing automatic loading during boot when supported hardware
is detected.
Below changes are suggested by chs@:
- Corrected the file name typo mistake in /sys/conf/files from
mpi3mr_app.c.c to mpi3mr_app.c
- Added mpi3mr driver entries in "sys/amd64/conf/GENERIC" and
"sys/i386/conf/GENERIC"
Reviewed by: ssaxena, chs, imp
Differential Revision: https://reviews.freebsd.org/D49754
|
| |
|
|
|
|
|
|
|
| |
The vm.pmap.prefer_la48 manages the mode.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49913
|
| |
|
|
|
|
| |
File PHO was added by mistake. Removed.
Fixes: aa60a08f2a57 ("amd64: replace tailq pointers with iterators")
|
| |
|
|
|
|
|
|
| |
Change architecture-specific code to use iterators rather than tailq
pointers.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49923
|
| |
|
|
|
|
|
|
| |
In sgx code, use iterators to replace tailq pointers for page
manipulation.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49919
|
| |
|
|
|
|
| |
Noted by: olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
| |
for the first assigned pass-through device.
PR: 285976
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
| |
If iommu does not want to handle some device, e.g. because the ACPI
table does not list it as translated, this is not a reason to fail
creating the host domain.
PR: 285976
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
Fixes: fd748c7d5b7aefbeda604403f203637b12ae89df
Sponsored by: The FreeBSD Foundation
PR: 285797
MFC after: 1 week
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49629
|
| |
|
|
|
|
|
|
|
| |
and change create_mapping()/remove_mapping() to allow shorten results.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49629
|
| |
|
|
|
|
|
|
|
| |
PR: 285797
Reported and tested by: Bakul Shah <bakul@iitbombay.org>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49592
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
This uses the constant string of "sgx" as the pathname
Reviewed by: br, kib
Differential Revision: https://reviews.freebsd.org/D49336
|
| |
|
|
|
|
|
| |
Add wlan_gcmp wherever CCMP is defined in kernel configs.
Differential Revision: https://reviews.freebsd.org/D49343
Reviewed by: bz, cy
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust leaf 0x8000_001D %ecx 3 on AMD (L3 cache params).
- Report cache as 1-way associative. Glibc does not believe that there
are fully associative L3 caches, ignoring the leaf and falling back to
legacy way of reading cache params.
- Do not report 4095 logical CPUs per L3 cache, report the true total
number of emulated CPUs. The insanely large value tricked some
version of glibc to overflow 32bit calculation of the L3 cache size,
as reported in the PR.
Also, for leaf 0x8000_0008, do not clip ApicIdSize to zero if less than
4. This effectively falls back to legacy.
PR: 279901
With the help from: Florian Weimer <fweimer@redhat.com>
Reviewed by: kevans, meta, mp
Tested by: meta, mp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48187
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add support for "testb imm8,r/m8" emulation.
PR: 261940
PR: 282852
Reviewed by: markj, emaste
Approved by: emaste (mentor)
Obtained from: Illumos (https://www.illumos.org/issues/14483)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49208
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On all three platforms supported by vmm, we have mostly duplicated code
to manage guest physical memory regions. Deduplicate much of this code
and move it into sys/dev/vmm/vmm_mem.c.
To avoid exporting struct vm outside of machdep vmm.c, add a new
struct vm_mem to contain the memory segment descriptors, and add a
vm_mem() accessor, akin to vm_vmspace(). This way vmm_mem.c can
implement its routines without needing to see the layout of struct vm.
The handling of the per-VM vmspace is also duplicated but will be moved
to vmm_mem.c in a follow-up patch.
On amd64, move the ppt_is_mmio() check out of vm_mem_allocated() to keep
the code MI, as PPT is only implemented on amd64. There are only a
couple of callers, so this is not unreasonable.
No functional change intended.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D48270
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This MD function is invoked before dumping register set notes when
writing out a core dump to ensure that the PCB for a given thread is
up to date. This provides a centralized place to update the PCB with
values of the current thread for each arch rather than doing this work
in each register set's get method.
Discussed with: jrtc27
Reviewed by: kib, markj
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D44910
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way we got the kernel metadata pointer was by calling
preload_search_by_type with one of the following three: "elf kernel",
"elf32 kernel" and "elf64 kernel". Which one(s) we used wasn't
consistent though. Sometimes we would only try "elf kernel", and other
times we would try one of the latter two if the first failed. However,
the loader only ever sets "elf kernel" as the kernel type.
Now, the kmdp is a global, preload_kmdp, and it's initialized using
preload_initkmdp in machdep.c (or machdep_boot.c on arm/64).
preload_initkmdp takes a single boolean argument that tells us whether
not finding the kmdp is fatal or not.
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
|
| |
|
|
|
|
|
|
| |
It is no longer used anywhere (since 62508c531e0f), and not defined for
arm64 which also supports ACPI.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48486
|
| |
|
|
|
|
|
|
| |
This flag was used as a transition for differing pcib implementations.
Today it is defined for all supported architectures, and can be removed.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48485
|
| |
|
|
|
| |
Fixes: b995101
Reported by: Michael Butler (imb@protected-networks.net)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The amd64/fpu.c xsave_* routines track supported XSAVE components and
features. However, they only track supported user state components, and
there is currently no way for a consumer to check whether the CPU
supports a supervisor state component. Fix this by saving the supported
supervisor state components, enumerated by CPUID function 0DH,
sub-function 1, in a separate mask.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D48466
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These macros have substantially identical implementations on each
platform. Use roundup2/rounddown2 for round_page/trunc_page.
This version standardizes on not using explicit casts and instead
preserving the original type. A couple of tweaks were required to
make this work.
Reviewed by: brooks, kib, markj
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D48450
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In commit a97f683fe3c4 I didn't add code to remove the vmmctl device
when vmm.ko is unloaded, so it would persist and prevent vmm.ko from
being re-loaded.
Extend vmmdev_cleanup() to destroy the vmmctl cdev. Also call
vmmdev_cleanup() if vmm_init() fails.
Reviewed by: corvink, andrew
Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")
Differential Revision: https://reviews.freebsd.org/D48269
|
| |
|
|
|
|
|
|
|
| |
For consistency with other vm accessors.
No functional change intended.
Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D48268
|
| |
|
|
|
|
|
|
|
|
| |
It is a no-op and doesn't exist on other platforms. As part of some
work to deduplicate vmm code, just remove it.
No functional change intended.
Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D48267
|
| |
|
|
|
|
|
|
|
| |
This is intended to clean state of a thread at the end of its
lifecycle during wait(), not the beginning of its life cycle.
Reviewed by: kib
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D48023
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
details
The fault info should be useful to see what specifically BIOS tried to
do and why it faulted. E.g. it might allow to see which EFI memory
segment needs to be mapped in addition to normal runtime segments, to
work around the fault.
Reviewed by: kevans, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48186
|
| |
|
|
|
|
|
|
| |
Suggested by: markj
Reviewed by: kevans, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48186
|
| |
|
|
|
|
|
|
|
|
| |
This macro has not been in use since commit "inline atomics and allow tied
modules to inline locks" (r335873, f4b3640475cec929).
Reviewed by: markj, kib, emaste, imp
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48061
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to match reality, allow using these functions with pointers on
const objects, and bring us closer to C11.
Remove the '+' modifier in the atomic_load_acq_64_i586()'s inline asm
statement's constraint for '*p' (the value to load). CMPXCHG8B always
writes back some value, even when the value exchange does not happen in
which case what was read is written back. atomic_load_acq_64_i586()
further takes care of the operation atomically writing back the same
value that was read in any case. All in all, this makes the inline
asm's write back undetectable by any other code, whether executing on
other CPUs or code on the same CPU before and after the call to
atomic_load_acq_64_i586(), except for the fact that CMPXCHG8B will
trigger a #GP(0) if the memory address is part of a read-only mapping.
This unfortunate property is however out of scope of the C abstract
machine, and in particular independent of whether the 'uint64_t' pointed
to is declared 'const' or not.
Approved by: markj (mentor)
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46887
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch adds several routines that track and expose information
about various XSAVE-related features. More specifically, it adds the
ability to check whether a given XFEATURE is supported and which XSAVE
extensions are supported. Furthermore, it adds several routines for
calculating the size and offsets within a save area given a XSAVE
feature bitmap.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D47394
|
| |
|
|
|
| |
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46984
|
| |
|
|
|
|
|
|
|
|
| |
This refactor aims to add the ability to share performance counter
interrupts by refactoring the kernel-mode NMI handler. The handler now
allows multiple drivers to service the same interrupt (e.g. hwpmc(4)
and hwt(4)'s Intel Processor Trace backend).
Reviewed by: kib, avg
Differential Revision: https://reviews.freebsd.org/D46421
|
| |
|
|
|
|
| |
Noted by: rm
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
If you need to use libc with jemalloc without commit
eade2001aa9d91440886de8359a4dec9edcde2a9 (head, or
b90d68c9b28b0a458bdf4a963397817974ed0f90 stable/14), you have to set
vm.pmap.la57 to 0 for system-global effect, or use proccontrol -m la48
on affected image.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47675
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47674
|
| |
|
|
|
| |
Fixes: 0b32ef71f9f1 ("vmm: Correctly suspend and resume the vmm driver.")
Sponsored by: Klara, Inc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, VMXON would be executed on a resume, contrary to proper
initalization. The contents of MSR_IA32_FEATURE_CONTROL may be lost on
suspension, therefore must be restored. Likewise, the VMX Enable bit may be
cleared upon suspend, requiring it to be re-set.
Concretely disable VMX on suspend, and re-enable it on resume.
Note: any IOMMU context will remain lost for any enabled vmm devices.
Signed-off-by: Joshua Rogers <Joshua@Joshua.Hu>
Reviewed by: jhb,imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1419
|
| |
|
|
|
|
|
|
|
|
|
| |
Following arm64 and risc-v, move definitions that describe
hardware-enforced layout of PTEs and #PF error bits, into a dedicated
header.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47749
|
| |
|
|
|
|
|
|
|
|
|
| |
instead of constructing transient pte itself. This pre-set PG_A and
PG_M bits, avoiding atomic pte update on access and modification. Also
it set the nx bit, the mapping is not supposed to be used for executing.
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47717
|
| |
|
|
|
|
|
|
|
| |
Based on alc@ comments from https://reviews.freebsd.org/D47678.
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47717
|
| |
|
|
|
|
|
|
| |
PR: 282860
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47694
|
| |
|
|
|
|
|
|
|
|
| |
For current architectures, these are just aliases for the existing
operation on the relevant scalar integer.
Reviewed by: imp, kib
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D47631
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
vmmops_modinit() needs to create a device file, and this must happen
after SI_SUB_DEVFS. On non-EARLY_AP_STARTUP platforms (i.e., !x86) this
happens already by accident, but we shouldn't rely on it.
On riscv, remove the current SI_SUB_SMP ordering since that was copied
from arm64 and isn't needed. In particular, riscv's vmmops_modinit()
does not call smp_rendezvous().
Reported by: Oleksandr Kryvulia <shuriku@shurik.kiev.ua>
Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")
|