acpi: Treat ACPI_IVAR_FLAGS as a global IVAR
The ACPI bus uses the flags IVAR for any device with a _PRW method
including devices such as PCI bridges/devices that are not direct
children of acpi0.
Reported by: ngie
Reviewed by: ngie
Fixes: 0bb867e9f565 ("acpi: Split ACPI IVARs into global and private sets")
Differential Revision: https://reviews.freebsd.org/D55561
Makefile.inc1: Don't force LLVM_BINUTILS off for cross-tools
Because of this setting we were still using ELF Tool Chain tools for
buildworld. The sets of binary utilities are largely equivalent and
this went unnoticed after commit 1cae7121c667 ("Enable LLVM_BINUTILS
by default").
This was discovered recently because ELF Tool Chain objcopy produces
standalone debug files without phdrs and this caused an issue with a
3rd party ELF parser [1]. Remove the forced setting so that we use
LLVM's binutils to build the system.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=33876
Reviewed by: imp, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55650
INIT_ALL: Fix typo in option description
From GitHub pull request #2035; the change needs to be applied to the
source file for the option description, not the generated src.conf.5.
bhyve/virtio-scsi: Check LUN address validity
Instead of blindly trusting the guest OS driver that it sends us well-
formed LUN addresses, check the LUN address for validity and fail the
request if it is invalid. While here, constify the members of the virtio
requests which aren't device-writable anyway.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53470
bhyve/virtio-scsi: Preallocate all I/O requests
By preallocating all I/O requests on all queues, we can take most
allocations out of the hot I/O code paths and simplify the code
significantly. While here, make sure we check all allocations for
success and make sure to handle failures gracefully.
Additionally, check for I/O request validity as early as possible,
and return illegal requests immediately.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53469
bhyve/virtio: Rework iovec handling functions for efficiency and clarity
Add check_iov_len() to check whether an iovec array covers a certain
length without the need to call count_iov() on the whole array first.
Garbage-collect the 'seek' argument to buf_to_iov(), used only by
virtio-scsi control request handling. The apparent benefit of using it
to copy only the final status byte instead of the whole TMF or AN
request (25 and 21 bytes, respectively) is dubious at best, given that
the extra code to handle this in buf_to_iov() allocates and frees a new
iovec array and uses seek_iov(), which traverses the whole array and
copies iovecs around.
Replace seek_iov() and truncate_iov(), used only by virtio-scsi, with
a single function split_iov() which combines the functionality of both
in a more efficient way:
While seek_iov() always copies all iovecs past the seek offset into a
new iovec array, split_iov() works in place and doesn't copy iovecs
unless actually necessary. By using split_iov(), we can avoid almost
[4 lines not shown]
arm64/vmm: Support PMU v3p9
The only new register is read-only. As the kernel just passes the
registers to the guest directly no further change should be needed.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51764
arm64: Treat the PMUVer field of ID_AA64DFR0 as unsigned
The PMUVer field of ID_AA64DFR0 contains an unsigned version of the
Performance Monitors Extension, but it is currently treated as signed.
Change it to unsigned.
Reviewed by: andrew
Sponsored by: Arm Ltd
Signed-off-by: Kajetan Puchalski <kajetan.puchalski at arm.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2062
pfctl: consistency
% pfctl -F ethernet
Ethernet rules cleared
% pfctl -s ethernet
pfctl: Unknown show modifier 'ethernet'
pfctl accepts 'ethernet' (or any prefix of it) in the -F flag but
accepts only 'ether' (or any prefix of it) in the -s flag, which seems
inconsistent. This change brings the two to parity while remaining
backwards compatible.
Reviewed by: kp
MFC after: 2 weeks
Signed-off-by: Seth Hoffert <seth.hoffert at gmail.com>
bhyve: Fix truncate_iov()
The implementation was simply wrong. It would always just return the
first entry in the iovec, even if the requested length is larger than
that first entry.
Note, this function will be removed soon, see D53468.
Reported by: Vinod p n <vinod272 at gmail.com>
Reviewed by: des, emaste, Hans Rosenfeld <rosenfeld at grumpf.hope-2000.org>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D55438
(cherry picked from commit d7d4da91de201841c57a6b8f89b450754b9b8696)
bus_if: Fix typo
Reviewed by: olce
Approved by: olce
Fixes: 4c4392e791b7 ("Add doxygen doc comments for most of newbus and the BUS interface.")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48721
amdsmu: Sleep entry/exit hints for PMFW
amdsmu_suspend() and amdsmu_resume() for sending hints to the AMD SMU
power management firmware (PMFW) that we are entering and exiting
s2idle. We also dump sleep metrics once we tell it we're exiting sleep,
so the relevant metrics are updated.
Register these as acpi_post_dev_suspend and acpi_post_dev_resume
eventhandlers.
Reviewed by: olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48721
system(3): Unwrap execve()
There is no need to call execl(), which will allocate an array and copy
our arguments into it, when we can use a static array and call execve()
directly.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55648