Build and sysctl configuration modes are introduced for QAT SPR
devices to disable safe dc mode. A new QAT driver build option
‘QAT_DISABLE_SAFE_DC_MODE’ is required to build the QAT driver
with code that allows a request to be sent to FW to override the
‘History Buffer’ mitigation. Default QAT driver builds do not
include this ‘QAT_DISABLE_SAFE_DC_MODE’ build option. Even if the
QAT driver was built with code that allows a request to be sent to
FW to override the ‘History Buffer’ mitigation, the QAT driver must
still be configured using sysctl to request an override of the
‘History Buffer’ mitigation if desired. The default QAT driver
configuration option sysctl dev.qat.X.disable_safe_dc_mode does not
allow override of the mitigation. The new sysctl attribute
disable_safe_dc_mode is to be set to 1 for overriding the history
buffer mitigation. Firmware for qat_4xxx is updated for this change.
If this mode is enabled, decompression throughput increases but may
result in a data leak if num_user_processes is more than 1.
This option is to be enabled only if your system is not prone to
user data leaks.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
(cherry picked from commit 5a8e5215cef0dac1115853889e925099f61bb5fa)
This is derived from swills@ fork of the Juniper virtfs with many
changes by me including bug fixes, style improvements, clearer layering
and more consistent logging. The filesystem is renamed to p9fs to better
reflect its function and to prevent possible future confusion with
virtio-fs.
Several updates and fixes from Juniper have been integrated into this
version by Val Packett and these contributions along with the original
Juniper authors are credited below.
To use this with bhyve, add 'virtio_p9fs_load=YES' to loader.conf. The
bhyve virtio-9p device allows access from the guest to files on the host
by mapping a 'sharename' to a host path. It is possible to use p9fs as a
root filesystem by adding this to /boot/loader.conf:
vfs.root.mountfrom="p9fs:sharename"
for non-root filesystems add something like this to /etc/fstab:
sharename /mnt p9fs rw 0 0
In both examples, substitute the share name used on the bhyve command
line.
The 9P filesystem protocol relies on stateful file opens which map
protocol-level FIDs to host file descriptors. The FreeBSD vnode
interface doesn't really support this and we use heuristics to guess the
right FID to use for file operations. This can be confused by privilege
lowering and does not guarantee that the FID created for a given file
open is always used for file operations, even if the calling process is
using the file descriptor from the original open call. Improving this
would involve changes to the vnode interface which is out-of-scope for
this import.
Differential Revision: https://reviews.freebsd.org/D41844
Reviewed by: kib, emaste, dch
MFC after: 3 months
Co-authored-by: Val Packett <val@packett.cool>
Co-authored-by: Ka Ho Ng <kahon@juniper.net>
Co-authored-by: joyu <joyul@juniper.net>
Co-authored-by: Kumara Babu Narayanaswamy <bkumara@juniper.net>
This -g was introduce when I didn't review all the cahnges to mpi3mr I
was MFCing. Remove it. This is a direct commit.
PR: 249068
Fixes: 80b069913d
Sponsored by: Netflix
Approved by: re (cperciva)
(cherry picked from commit 22ebbdea3f33fdeae5ee83077ea9c25979705f2f)
Firmware advertises the transfer lenght for writesame commands to driver during init.
So for any writesame IOs with ndob and unmap bit set and transfer lengh is greater
than the max write same length specified by the firmware, then direct those commands
to firmware instead of hardware otherwise hardware will break.
Reviewed by: imp
Approved by: imp
Differential revision: https://reviews.freebsd.org/D44452
(cherry picked from commit 3f3a15543a6721100dda0e4219eb48ecbe35731a)
- Fix maximal keyboard backlight level, Although Linux source code
comment says that backlight level is encoded in 3 bits of data,
actual code limits maximum level to 3.
- Add backlight(9) support for keyboard
- Turn off/on keyboard backlight on suspend/resume
Sponsored by: Future Crew LLC
MFC after: 1 month
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D48983
(cherry picked from commit f134662a1a5726d78880385002a03b8fe68805f6)
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit a0ccc12f6882a886d89ae279c541b2c2b62c6aca)
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit df279a26d3315e7abc9e6f0744137959a4c2fb86)
Following the example of rtw88 and rtw89 only ship iwlwifi firmware
from ports/packages. Users are asked to run fwget(8) to install the
firmware needed for their system or build it from ports
(see also UPDATING).
This is the end of a long story adding wireless support to fwget(8),
migrating the firmware for multiple branches into ports, splitting them
up into flavors, and updating some install media and the installer to
provide firmware.
The overall amount for new firmware amongst all drivers would have
added more than 100M of binary blobs to src.git for the first import,
ignoring future updates which (along with some duplication between
multiple drivers) was considered too much.
While maintenance within the src tree certainly would have been
easier in the longer term this seems to be the better solution and
I would like to thank everyone who helped along the path to get there.
The iwlwififw.4 man page is to stay (for now) and will likely point
at the appropriate firmware package flavor in the future as well
so people may find it easier to transition. In the long term this
information is likely not needed anymore.
Sponsored by: The FreeBSD Foundation
Requested by: core (Oct 2022)
Reviewed by: thj, jrm (earlier)
Differential Revision: https://reviews.freebsd.org/D49713
(cherry picked from commit 558d638896239f9cd25b9d825ecfce62ec54681e)
(cherry picked from commit 918783b75aacb051f2f83dd0198ef68bc9fa5326)
unless the dev.acpi_ibm.0.handlerevents sysctl is set to process
them internally. The default for the latter is to ignore them,
so passing to evdev(4) is enabled by default.
Reviewed by: wulf, imp
Tested on: Lenovo Thinpad X11 Carbon 7Th Gen
Differential Revision: https://reviews.freebsd.org/D48174
(cherry picked from commit c21f5751ef0932796676e55953461e0679020e28)
Following 07f6575585bf also turn on debugfs support for rtw89.
Sponnsored by: The FreeBSD Foundation
(cherry picked from commit 446eab491e523e3d7586e11cb16448e524297da4)
Remove the =1 from -DCONFIG_* in the conditional cases.
They are not needed.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 411c857b4ccedd6491dff9a35e952bc49d053053)
Make iwlwifi compile with debugfs after the last updates and turn it on
for both iwlwifi and rtw88 in order to be able to get at least some
useful information on driver/firwmare state.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 07f6575585bf69ae48dffe87c4578057ae4782d8)
This adds support for the Realtek 8922AE PCI
wireless network (Wi-Fi 7) adapter.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 6d67aabd63555ab62a2f2b7f52a75ef100a2fe75)
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 11c53278a8a3e86e14377f09bbaa7bad193d3713)
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit a4128aad8503277614f2d214011ef60a19447b83)
We currently rely on the kernel linker resolving undefined references
against local symbols from other kernel modules. Be explicit about the
symbols to export, in advance of changing that behaviour.
PR: 207898
Reviewed by: kib, bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47980
(cherry picked from commit c3d2c959b5c0ea05d6e5162def35d51ec267590c)
Attempt to initialize FreeBSD bluetooth stack while such a device is in
bootloader mode locks the adapter hardly so it requires power on/off
cycle to restore.
This change blocks ng_ubt attachment unless operational firmware is
loaded thus preventing the lock up.
Sponsored by: Future Crew LLC
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D46738
(cherry picked from commit 24ae172a50352ad4fd22989477f29ecca5aed6e3)
OpenZFS release 2.2.7
Notable upstream pull request merges:
#15457022bf8637 Increase L2ARC write rate and headroom
#155271ba5b2ef8 freebsd: remove __FBSDID macro use
#157929e7af55e8 Add custom debug printing for your asserts
#15793a1ea40af8 libzfs: use zfs_strerror() in place of strerror()
#16181 -multiple zdb/ztest: improve and harmonise crash output
#16208e5e4957a5 Allow block cloning to be interrupted by a signal
#16210ba4e582a6 FreeBSD: Add const qualifier to members of struct
opensolaris_utsname
#16225a6198f34b Simplify issig()
#1633525ec9a903 zdb: fix BRT dump
#16364cf80a803d zvol: ensure device minors are properly cleaned up
#16404384b53be8 FreeBSD: Add missing memory reclamation accounting
#16492 -multiple Split "shared" userspace & kernel code into separate files
#16496f1694496a zfs_file: rename zfs_file_fallocate to zfs_file_deallocate
#16511bc0d89bfc Fix an uninitialized data access
#165292dc8529d9 Fix handling of DNS names with '-' in them for sharenfs
#1653930ea44296 zfs_log: add flex array fields to log record structs
#16546098789216 Evicting too many bytes from MFU metadata
#1655154278533a Reduce and handle EAGAIN errors on AIO label reads
#1655484ad1d536 FreeBSD: restore zfs_znode_update_vfs()
#1656521c40e6d9 FreeBSD: Sync taskq_cancel_id() returns with Linux
#1656748482bb2f Properly release key in spa_keystore_dsl_key_hold_dd()
#16584e8f4592a1 Avoid computing strlen() inside loops
#16605acc8a3186 ARC: Cache arc_c value during arc_evict()
#16650fc60e0c6e freebsd: Use compiler.h from FreeBSD's base's linuxkpi
#16667b32b35cea zdb: show bp in uberblock dump
#166841f5e1b919 Pack dmu_buf_impl_t by 16 bytes
#1668873b3e8ace Fix gcc uninitialized warning in FreeBSD zio_crypt.c
#16690727506c94 On the first vdev open ignore impossible ashift hints
#16692d83cd5307 zdb: add extra -T flag to show histograms of BRT refcounts
#1669382ab837a0 Fix gcc unused value warning in FreeBSD simd.h
#167402bba6e3c5 BRT: Don't call brt_pending_remove() on holes/embedded
#16801299da6ace Fix race in libzfs_run_process_impl
Obtained from: OpenZFS
OpenZFS commit: e269af1b3c
OpenZFS tag: zfs-2.2.7
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47732
(cherry picked from commit 0b4e32912566d802c7a6501d9ce8119f04dbc2fb)
DQO is the descriptor format for our next generation virtual NIC.
It is necessary to make full use of the hardware bandwidth on many
newer GCP VM shapes.
One major change with DQO from its predecessor GQI is that it uses
dual descriptor rings for both TX and RX queues.
The TX path uses a descriptor ring to send descriptors to HW, and
receives packet completion events on a TX completion ring.
The RX path posts buffers to HW using an RX descriptor ring and
receives incoming packets on an RX completion ring.
In GQI-QPL, the hardware could not access arbitrary regions of
guest memory, which is why there was a pre-negotitated bounce buffer
(QPL: Queue Page List). DQO-RDA has no such limitation.
"RDA" is in contrast to QPL and stands for "Raw DMA Addressing" which
just means that HW does not need a fixed bounce buffer and can DMA
arbitrary regions of guest memory.
A subsequent patch will introduce the DQO-QPL datapath that uses the
same descriptor format as in this patch, but will have a fixed
bounce buffer.
Signed-off-by: Shailend Chand <shailend@google.com>
Reviewed-by: markj
MFC-after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D46690
(cherry picked from commit d438b4ef0cfc6986b93d0754f49ebf3ead50f269)
'acpi_if.h' was accidentally omitted from the module Makefile; add it.
Fixes: 9709bda03cd0
(cherry picked from commit bb8b3b1741188ab284e8b48ec367961a480421cb)
Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars. A new gpioaei.c
file implements the device, which simply requests an interrupt when
the pin is triggered and invokes the appropriate _Exx or _Lxx ACPI
method.
This makes the GPIO "power button" work on arm64 Graviton systems,
allowing EC2 "Stop"/"Reboot" instance calls to be handled cleanly.
(Prior to this change, those requests would time out after 4 minutes
and the instance would be forcibly killed.)
Reviwed by: imp, andrew, Ahmad Khalifa
MFC after: 3 days
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D47253
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>
(cherry picked from commit 9709bda03cd0f20eba0ba4276fc3c2e06354a54f)
This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.
Reviewed by: wulf
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/1359
(cherry picked from commit 92adaa5862d5ea94318a011e0618622d0fb72521)
This commit updates all the license signatures to 2024.
Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.
(cherry picked from commit 8d6806cd08c093fc001db1f94cf122368b8d1549)
PCI_IRQ_LEGACY was added in 366d68f283 (likely) for rtw88 only.
The define now got renamed and I cannot find any other use but
rtw88 and rtw89.
We keep the old name as comapt while driver updates are in
progress enabling it defining LINUXKPI_VERSION for the two drivers.
Sponsored by; The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46822
(cherry picked from commit 157e93e0e8138fbaa6ab5d5b20b0c23f903667a6)
Primarily adds support for E830 devices, unlocking all of their
functionality.
As well, update the README and remove the non-FreeBSD sections
from it.
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Sponsored by: Intel Corporation
(cherry picked from commit f9a039060e834e89e0b2de1e8a442d78bd5c083d)
Use .PATH & bare filename. This prevents the real source path from
being included in the built object, which improves reproducibility.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1211
(cherry picked from commit 8c2f6c3be0125142d3c1782e4b0ee0634c584b9e)
Armv8.5 adds an optional random number generator. This is implemented
as two special registers one to read a random number, the other to
re-seed the entropy pool before reading a random number. Both registers
will set the condition flags to tell the caller they can't produce a
random number in a reasonable amount of time.
Without a signal to reseed the entropy pool use the latter register
to provide random numbers to the kernel pool. If at a later time we
had a way to tell the provider if it needs to reseed or not we could
use the former.
On an Amazon AWS Graviton3 VM this never failed, however this may not
be the case on low end CPUs so retry reading the random number 10 times
before returning an error.
Reviewed by: imp, delphij (csprng)
Sponsored by: The FreeBSD Foundation
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D35411
(cherry picked from commit 9eecef052155646fbc5f8f533b952b372572d06a)
rtw89 firmware files were removed from main a year ago after core members
asked to not import more biinary blobs into main.
Also remove the module build framework for them on stable/14 to
avoid any confusion (it was never attached to the build).
People are asked to use fwget(8) to automatically install firmware
from ports according to the man page. A solution for the install
media is still pending.
X-MFC after: rtw89 only
Sponsored by: The FreeBSD Foundation
(cherry picked from commit cf94672363d6638b7268c05b4628b62bbfc8dbe5)
(cherry picked from commit 7ff12dd25ada486c4d33e854977514b2db690e7f)
After two years, add the initial man page and hook Realteks rtw89
driver up to the build for more people to test given successful
reports.
devd.conf is already providing support based on the rtw<n+> regex.
The driver uses the LinuxKPI compat layer.
Firmware is provided by ports: net/wifi-firmware-rtw89-kmod or
one of the flavours. People are advised to used fwget(8) to
automatically install the correct firmware for their chipset.
Please note that for the moment the driver requires a tunable to
be set in loader.conf: compat.linuxkpi.skb.mem_limit=1
Many thanks to everyone who in the last two years helped testing,
debugged, submitted patches to get the driver to this stage where
initial functionality seems working.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 310c31d3f04ef9d3ebe598fd076d017a48d0ca0d)
Ignoring page_pools with the few needed adjustments and ignoring 7622
mt7615 seems to build as well. Add it so once we can connect it to
the build people can start testing and debugging.
(The actual work was done on a newer version of the mt76 drivers but
it seems the to-build-changes equally apply here already).
Requested by: Radu-Cristian Fotescu (freebsd-wireless, 2024-07-31)
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7728586800bd5bb4655cff6d661133ed10cc2ff7)
When we enable checking for BTI on arm64 we need to include an ELF
note in all object files linked into a module.
As using objcopy from a binary to an ELF object file doesn't add the
note switch to using .incbin from an assembly file. This allows us to
add the needed note without affecting the included object.
Reviewed by: imp, kib, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45468
(cherry picked from commit bed65d85c631c3a8e60a81a15a5a745c8ef92fbe)
(cherry picked from commit ec69d230933f82c7c142b053882255aa57475463)
OpenZFS release 2.2.5
Notable upstream pull request merges:
#15609566841171 Only provide execvpe(3) when needed
#159409edf6af4a Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
#160380f1e8ba2f L2ARC: Cleanup buffer re-compression
#16104b474dfad0 Refactor dbuf_read() for safer decryption
#16118938d1588e Make more taskq parameters writable
#16131672474659 Slightly improve dnode hash
#161384c0fbd8d6 FreeBSD: Add zfs_link_create() error handling
#16159fa4b1a404 ZAP: Fix leaf references on zap_expand_leaf() errors
#1616241f2a9c81 Fix scn_queue races on very old pools
#161654c484d66b Fix ZIL clone records for legacy holes
#1620627cc6df76 Use memset to zero stack allocations containing unions
#162072eab4f7b3 Fix assertion in Persistent L2ARC
#1621413ccbbb47 Some improvements to metaslabs eviction
#16216ba3c7692c Destroy ARC buffer in case of fill error
#162584d2f7f983 vdev_open: clear async fault flag after reopen
#16264ef08cb26d Fix long_free_dirty accounting for small files
#1627354ef0fdf6 head_errlog: fix use-after-free
#1628414cce09a6 FreeBSD: Use a statement expression to implement
SET_ERROR()
#164066f27c4cad Make 'rmmod zfs' work after zfs-2.2.4
Obtained from: OpenZFS
OpenZFS commit: 33174af151
OpenZFS tag: zfs-2.2.5
disable hdmi_audio_infoframe_pack_for_dp function for now as it depends
on not imported yet drm sources and is not used by drm-kmod.
Reviewed by: manu
Sponsored by: Serenity CyberSecurity, LLC
Differential Revision: https://reviews.freebsd.org/D46224
(cherry picked from commit c89d94ad5d95fd15e891b2723caae8a6104ee153)
This was done in the original DTrace import, presumably because that
made it a bit easier to handle includes. However, this can cause
dtrace_getpcstack() to be inlined into dtrace_probe(), resulting in a
missing frame in stack traces since dtrace_getpcstack() takes care to
bump "aframes" to account for its own stack frame.
To avoid this, compile dtrace_isa.c separately on all platforms. Add
requisite includes.
MFC after: 2 weeks
Sponsored by: Innovate UK
(cherry picked from commit 82283cad12a417abfb1469d899b2d7cfb1d38f77)
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45967
(cherry picked from commit c15c9315b2cb7601cc337f7d5a8e124f4b2d5861)
The NVMe drivers are portable and are already included statically in
GENERIC on other architectures such as aarch64 and riscv64.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44690
(cherry picked from commit 16e846fa1ed3c97419b55b292f77b0f4209f0875)
Currently FreeBSD uses IPI based TLB flushing for remote
TLB flushing. Hyper-V allows hypercalls to flush local and
remote TLB. The use of Hyper-V hypercalls gives significant
performance improvement in TLB operations.
This patch set during test has shown near to 40 percent
TLB performance improvement.
Also this patch adds rep hypercall implementation as well.
Reviewed by: whu, kib
Tested by: whu
Authored-by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Co-Authored-by: Erni Sri Satya Vennela <ernis@microsoft.com>
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D45521
(cherry picked from commit 2b887687edc25bb4553f0d8a1183f454a85d413d)
This policy enables a user to become another user without having to be
root (hence no setuid binary). it is configured via rules using sysctl
security.mac.do.rules
For example:
security.mac.do.rules=uid=1001:80,gid=0:any
The above rule means the user identifier by the uid 1001 is able to
become user 80
Any user of the group 0 are allowed to become any user on the system.
The mdo(1) utility expects the MAC/do policy to be installed and its
rules defined.
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D45145
(cherry picked from commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
We need uart_bus_puc.c in the module for it to work.
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit 304ac69eca623d63510aa61853adc1ea60593323)
This contain the hdmi code and the aperture code like in linux.
Differential Revision: https://reviews.freebsd.org/D44925
Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit 11d79c4756b7c85faf7c4a268c301a41ce0887b9)
In order to have a proper linuxkpi_video kmod, move the module declaration
to a new file as linuxkpi_video will also include linux_hdmi.c
Differential Revision: https://reviews.freebsd.org/D44926
Reviewed by: bz, emaste, wulf
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit 7f84bb34a1d191949ec519a01c0c574f5e827c88)
LINT includes bnxt_re driver. Adjust the path in files, add missing
files and add a new BNXT_C to build (which thinly wraps OFED version
with bnxt specicif stuff).
Sponsored by: Netflix
Fixes: acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
(cherry picked from commit 175b2c00a6bcb0c8c1f6b76b6da9bf4879a5848e)