#
3ccb0233 |
| 26-Aug-2024 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Move vmm_ktr.h to a common directory
No functional change intended.
Reviewed by: corvink, jhb, emaste Differential Revision: https://reviews.freebsd.org/D46429
|
#
5dbf8861 |
| 24-Jun-2024 |
Doug Moore <dougm@FreeBSD.org> |
x86: use order_base_2
Use order_base_2 in place of expressions involving fls.
Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536
|
#
9ff14629 |
| 04-Jun-2024 |
Doug Moore <dougm@FreeBSD.org> |
x86: simplify ceil(log2(x)) function
A function called mask_width in one place and log2 in the other calculates its value in a more complex way than necessary. A simpler implementation offered here
x86: simplify ceil(log2(x)) function
A function called mask_width in one place and log2 in the other calculates its value in a more complex way than necessary. A simpler implementation offered here saves a few bytes in the functions that call it.
Reviewed by: alc, avg Differential Revision: https://reviews.freebsd.org/D45483
show more ...
|
Revision tags: release/14.1.0 |
|
#
8d66b134 |
| 11-Apr-2024 |
Elyes Haouas <ehaouas@noos.fr> |
vmm/x86: Fix typo
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/885
|
Revision tags: release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
#
47cf1b37 |
| 25-Apr-2023 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Expose some more AVX512 CPUID bits to guests
This is required to announce support for some accelerated AES operations. AVX512BW indicates support for the AVX512-FP16 extension and AVX512VL ind
vmm: Expose some more AVX512 CPUID bits to guests
This is required to announce support for some accelerated AES operations. AVX512BW indicates support for the AVX512-FP16 extension and AVX512VL indicates support for the use of AVX512 instructions with vector lengths smaller than 512 bits.
VAES and VPCLMULQDQ extensions indicate that VEX-prefixed AES-NI and pclmulqdq instructions are supported.
All of these bits are needed for OpenSSL to use VAES to accelerate AES-GCM transforms.
Reviewed by: corvink, kib, jhb MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D39781
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
d27d543c |
| 23-Jun-2022 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
vmm: purge EOL release compatibility
Remove FreeBSD 11 support
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D355
vmm: purge EOL release compatibility
Remove FreeBSD 11 support
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560
show more ...
|
#
3f0f4b15 |
| 18-Nov-2022 |
John Baldwin <jhb@FreeBSD.org> |
vmm: Lookup vcpu pointers in vmmdev_ioctl.
Centralize mapping vCPU IDs to struct vcpu objects in vmmdev_ioctl and pass vcpu pointers to the routines in vmm.c. For operations that want to perform an
vmm: Lookup vcpu pointers in vmmdev_ioctl.
Centralize mapping vCPU IDs to struct vcpu objects in vmmdev_ioctl and pass vcpu pointers to the routines in vmm.c. For operations that want to perform an action on all vCPUs or on a single vCPU, pass pointers to both the VM and the vCPU using a NULL vCPU pointer to request global actions.
Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37168
show more ...
|
#
80cb5d84 |
| 18-Nov-2022 |
John Baldwin <jhb@FreeBSD.org> |
vmm: Pass vcpu instead of vm and vcpuid to APIs used from CPU backends.
Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37162
|
#
d3956e46 |
| 18-Nov-2022 |
John Baldwin <jhb@FreeBSD.org> |
vmm: Use struct vcpu in the instruction emulation code.
This passes struct vcpu down in place of struct vm and and integer vcpu index through the in-kernel instruction emulation code. To minimize u
vmm: Use struct vcpu in the instruction emulation code.
This passes struct vcpu down in place of struct vm and and integer vcpu index through the in-kernel instruction emulation code. To minimize userland disruption, helper macros are used for the vCPU arguments passed into and through the shared instruction emulation code.
A few other APIs used by the instruction emulation code have also been updated to accept struct vcpu in the kernel including vm_get/set_register and vm_inject_fault.
Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37161
show more ...
|
#
5afcca13 |
| 30-Jun-2022 |
Vitaliy Gusev <gusev.vitaliy@gmail.com> |
vmm: Cherry pick illumos commit '13361 bhyve should mask RDT cpuid info'
Summary: commit 1a5f1879be09d3de900b2510692dd12003784d84 Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2
vmm: Cherry pick illumos commit '13361 bhyve should mask RDT cpuid info'
Summary: commit 1a5f1879be09d3de900b2510692dd12003784d84 Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-12-16T20:02:23.000Z
13361 bhyve should mask RDT cpuid info Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
https://github.com/illumos/illumos-gate/commit/1a5f1879be09d3de900b2510692dd12003784d8
----
We saw similar warning of GP (on Intel Xeon CPU E5-2630 v4 and VM with Ubuntu 20.04 5.4.0-113-generic) until this commit is applied:
``` [ 1.658880] kernel: unchecked MSR access error: WRMSR to 0xc8f (tried to write 0x0000000000000000) at rIP: 0xffffffffacc735b4 (native_write_msr+0x4/0x30) [ 1.662734] kernel: Call Trace: [ 1.663885] kernel: ? clear_closid_rmid.isra.0+0x36/0x40 [ 1.665501] kernel: resctrl_online_cpu+0xdc/0x3f0 [ 1.666952] kernel: ? __switch_to_asm+0x40/0x70 [ 1.668358] kernel: ? __switch_to+0x7f/0x480 [ 1.669693] kernel: ? cat_wrmsr+0x70/0x70 [ 1.670970] kernel: cpuhp_invoke_callback+0x9b/0x580 [ 1.672541] kernel: ? __schedule+0x2eb/0x740 [ 1.673893] kernel: cpuhp_thread_fun+0xb8/0x120 [ 1.675304] kernel: smpboot_thread_fn+0xd0/0x170 [ 1.676685] kernel: kthread+0x104/0x140 [ 1.677948] kernel: ? sort_range+0x30/0x30 [ 1.679299] kernel: ? kthread_park+0x90/0x90 [ 1.680570] kernel: ret_from_fork+0x35/0x40 [ 1.682000] kernel: *** VALIDATE rdt *** [ 1.683454] kernel: resctrl: L3 monitoring detected ```
Reviewed by: markj, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35442
show more ...
|
Revision tags: release/13.1.0 |
|
#
6171e026 |
| 14-Jan-2022 |
Corvin Köhne <CorvinK@beckhoff.com> |
bhyve: add support for MTRR
Some guests or driver might depend on MTRR to work properly. E.g. the nvidia gpu driver won't work without MTRR.
Reviewed by: markj MFC after: 2 weeks Sponsored by: Beck
bhyve: add support for MTRR
Some guests or driver might depend on MTRR to work properly. E.g. the nvidia gpu driver won't work without MTRR.
Reviewed by: markj MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33333
show more ...
|
Revision tags: release/12.3.0 |
|
#
4c599db7 |
| 26-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Let guests enable SMEP/SMAP if the host supports it
Reviewed by: kib, grehan, jhb Tested by: grehan (AMD) MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://
vmm: Let guests enable SMEP/SMAP if the host supports it
Reviewed by: kib, grehan, jhb Tested by: grehan (AMD) MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30462
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
a3f2a9c5 |
| 01-Oct-2020 |
John Baldwin <jhb@FreeBSD.org> |
Clear the upper 32-bits of registers in x86_emulate_cpuid().
Per the Intel manuals, CPUID is supposed to unconditionally zero the upper 32 bits of the involved (rax/rbx/rcx/rdx) registers. Previousl
Clear the upper 32-bits of registers in x86_emulate_cpuid().
Per the Intel manuals, CPUID is supposed to unconditionally zero the upper 32 bits of the involved (rax/rbx/rcx/rdx) registers. Previously, the emulation would cast pointers to the 64-bit register values down to `uint32_t`, which while properly manipulating the lower bits, would leave any garbage in the upper bits uncleared. While no existing guest OSes seem to stumble over this in practice, the bhyve emulation should match x86 expectations.
This was discovered through alignment warnings emitted by gcc9, while testing it against SmartOS/bhyve.
SmartOS bug: https://smartos.org/bugview/OS-8168 Submitted by: Patrick Mooney Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D24727
show more ...
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
f5f5f1e7 |
| 18-Aug-2020 |
Peter Grehan <grehan@FreeBSD.org> |
Support guest rdtscp and rdpid instructions on Intel VT-x
Enable any of rdtscp and/or rdpid for bhyve guests on Intel-based hosts that support the "enable RDTSCP" VM-execution control.
Submitted by
Support guest rdtscp and rdpid instructions on Intel VT-x
Enable any of rdtscp and/or rdpid for bhyve guests on Intel-based hosts that support the "enable RDTSCP" VM-execution control.
Submitted by: adam_fenn.io Reported by: chuck Reviewed by: chuck, grehan, jhb Approved by: jhb (bhyve), grehan MFC after: 3 weeks Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D26003
show more ...
|
Revision tags: release/11.4.0 |
|
#
ec048c75 |
| 15-May-2020 |
Peter Grehan <grehan@FreeBSD.org> |
Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest
In recent Linux (5.3+) and OpenBSD (6.6+) kernels, and with hosts that support CPUID 0x15, the local APIC frequency is determined directly
Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest
In recent Linux (5.3+) and OpenBSD (6.6+) kernels, and with hosts that support CPUID 0x15, the local APIC frequency is determined directly from the reported crystal clock to avoid calibration against the 8254 timer.
However, the local APIC frequency implemented by bhyve is 128MHz, where most h/w systems report frequencies around 25MHz. This shows up on OpenBSD guests as repeated keystrokes on the emulated PS2 keyboard when using VNC, since the kernel's timers are now much shorter.
Fix by reporting all-zeroes for CPUID 0x15. This allows guests to fall back to using the 8254 to calibrate the local APIC frequency.
Future work could be to compute values returned for 0x15 that would match the host TSC and bhyve local APIC frequency, though all dependencies on this would need to be examined (for example, Linux will start using 0x16 for some hosts).
PR: 246321 Reported by: Jason Tubnor (and tested) Reviewed by: jhb Approved by: jhb, bz (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24837
show more ...
|
#
b33a8b38 |
| 16-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357966 through r357999.
|
#
b40598c5 |
| 15-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (4 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marke
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (4 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Reviewed by: kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23625 X-Generally looks fine: jhb
show more ...
|
#
74dc6beb |
| 14-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357855 through r357920.
|
#
caab5042 |
| 13-Feb-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
vmm: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn> Discussed with: grehan Reviewed by: jhb (previous version) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D
vmm: Add Hygon Dhyana support.
Submitted by: Pu Wen <puwen@hygon.cn> Discussed with: grehan Reviewed by: jhb (previous version) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23553
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|