Commit Graph

280169 Commits

Author SHA1 Message Date
Bartosz Sobczak
777e472cd8
irdma(4): Upgrade driver to 1.1.5-k
This is to upgrade current irdma driver version (in support of RDMA on
Intel(R) Ethernet Controller E810) to 1.1.5-k

change summary:
- refactor defines for hardware registers
- rereg_mr verb added in libirdma
- fix print warning during compilation
- rt_ros2priority macro fix
- irdma.4 validated with mandoc
- fixing nd6_resolve usage
- added libirdma_query_device
- sysctl for irdma version
- aeq_alloc_db fix
- dwork_flush protected with qp refcount
- PFC fixes

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36944
2022-12-21 17:13:42 -08:00
Rick Macklem
3fe0cb6695 rpc.tlsclntd: Check for a tls syscall failure.
Although the tls syscall to set up the upcall should
not normally fail, the daemon should check for such
a failure.  This patch adds a check for that failure.

MFC after:	1 week
2022-12-21 15:12:06 -08:00
John Baldwin
3266131908 Fix spelling of NO_WINFINITE_RECURSION.
Reported by:	dim
Fixes:		2e08e4b75e zfs: Fix build with GCC 12.
2022-12-21 14:45:29 -08:00
Justin Hibbits
ec22a3a259 DrvAPI: Trivial mechanical conversions for various drivers
Mechanically convert the following drivers, with trivial changes:
* ipw(4)
* igc(4)
* enetc(4)
* malo(4)
* nfe(4)
* bxe(4)
* awg(4)
* otus(4)
* rtwn(4)
* bnxt(4)
* ath(4)

Sponsored by:	Juniper Networks, Inc.
2022-12-21 15:36:59 -05:00
Justin Hibbits
79422a716d ixl: Fix a mechanical mess-up in DrvAPI conversion
ixl_iw.c is not compiled by default, and I missed this in code
inspection.

Reported by:	erj@
Sponsored by:	Juniper Networks, Inc.
2022-12-21 15:36:59 -05:00
Emmanuel Vadot
ccd8c4488a linuxkpi: seq_read: Fix off by one error
strscpy needs the buffer length not the string length (so including
the '\0').

Reviewed by:	bz
Fixes:	f697b9432d ("linuxkpi: drm-kmod debugfs support")
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D37771
2022-12-21 21:11:31 +01:00
John Baldwin
2e08e4b75e zfs: Fix build with GCC 12.
Silence -Winfinite-recursion for ldo.c in lua and -Wstringop-overread
for nvpair.c.

Reviewed by:	mm
Differential Revision:	https://reviews.freebsd.org/D37631
2022-12-21 10:49:23 -08:00
John Baldwin
1aa6d44dec Disable -Wzero-length-bounds for the kernel for GCC 12.
The mlx5 driver and some other OFED bits use a somewhat dubious
pattern of:

  struct foo {
      uint64_t arg[0];
      /* Real members of a struct */
  };

The code then treats 'arg' as if it were really a kind of union
such that foo.arg[N] functions similarly to (uint64_t *)foo[N].
This uses of foo.arg[N] then trigger this warning.

No real bugs were found by this warning though, so just turn it off
globally.

Reviewed by:	hselasky, kib
Differential Revision:	https://reviews.freebsd.org/D37630
2022-12-21 10:48:15 -08:00
John Baldwin
2637ed558b Disable -Wdangling-pointer for the kernel for GCC 12.
Some of the warnings raised in the kernel seem to be outright bugs in
the compiler (e.g. the cases in ata_xpt.c and scsi_xpt.c).  Other
cases are not fatal and it didn't seem to find any legitimate bugs in
the kernel.

Differential Revision:	https://reviews.freebsd.org/D37629
2022-12-21 10:46:26 -08:00
John Baldwin
488c498b09 Disable errors for -Wnonnull for the kernel for GCC 12.
The USB code and some other places raise false positives when a NULL
pointer is passed to an inlined function along with a separate length
and the compiler can't determine that the separate length of 0
prevents the use of the NULL pointer.

Differential Revision:	https://reviews.freebsd.org/D37627
2022-12-21 10:46:06 -08:00
John Baldwin
95d146592f iee80211_hwmp: Don't dereference NULL ni in debug printf.
In this call to IEEE80211_NOTE, ni is always NULL due to the assignment
a few lines earlier at the start of the function.  If debug traces are
enabled, then this will pass an invalid pointer as the 'mac' pointer to
ieee80211_note_mac.  Use IEEE80211_DPRINTF which doesn't take a 'ni'
argument instead.

Reported by:	GCC -Wstringop-overread
Reviewed by:	bz, emaste
Differential Revision:	https://reviews.freebsd.org/D37626
2022-12-21 10:45:45 -08:00
John Baldwin
9f0c0e6eed mrsas: Don't leak a stack pointer value in the softc.
mrsas_issue_blocked_cmd stores a pointer to an on-stack variable
in its softc so that the driver can call wakeup() on the correct
pointer.  Once the loop around tsleep() has finished however, the
pointer is no longer needed and any further use would be invalid.
Clear sc->chan to NULL after the loop.

Reported by:	GCC -Wdangling-pointer
Differential Revision:	https://reviews.freebsd.org/D37628
2022-12-21 10:45:26 -08:00
John Baldwin
e53fcff184 bhyve: Simplify spinup_ap_realmode slightly.
There is no reason to modify the passed in rip variable.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37647
2022-12-21 10:33:34 -08:00
John Baldwin
7224a96a55 bhyve: Tidy vCPU pthread startup.
Set the thread affinity in fbsdrun_start_thread next to where the
thread name is set.  This keeps all the pthread initialization
operations at the start of a thread in one place.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37646
2022-12-21 10:33:18 -08:00
John Baldwin
8487443792 bhyve: Don't access vcpumap[vcpu] directly in parse_cpuset().
Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37645
2022-12-21 10:33:04 -08:00
John Baldwin
a20c00c60e bhyve: Allocate struct vm_exit on the stack in vm_loop.
The global vmexit[] array is no longer needed to smuggle the rip
value from fbsdrun_addcpu() to vm_loop().

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37644
2022-12-21 10:32:45 -08:00
John Baldwin
ceb0d0b0f1 bhyve: Remove some no-op code for setting RIP.
fbsdrun_addcpu() read the current vCPU's RIP register from the kernel
via vm_get_register() to pass along through some layers to vm_loop()
which then set the register via vm_set_register().  However, this is
just always setting the value back to itself.

Reviewed by:	corvink
Differential Revision:	https://reviews.freebsd.org/D37643
2022-12-21 10:32:24 -08:00
John Baldwin
461663ddba bhyve: Simplify setting vCPU capabilities.
- Enable VM_CAP_IPI_EXIT in fbsdrun_set_capabilities along with other
  capabilities enabled on all vCPUs.

- Don't call fbsdrun_set_capabilities a second time on the BSP in
  spinup_vcpu.

- To preserve previous behavior, don't unconditionally enable
  unrestricted guest mode on the BSP (this unbreaks single-vCPU guests
  on Nehalem systems, though supporting such setups is of dubious
  value).  Other places that enbale UG on the BSP are careful to check
  the result of the operation and fail if it is not available.

- Don't set any capabilities in spinup_ap().  These are now all
  redundant with earlier settings from spinup_vcpu().

- While here, axe a stale comment from fbsdrun_addcpu().  This
  function is now always called from the main thread for all vCPUs.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37642
2022-12-21 10:31:16 -08:00
John Baldwin
e7d5d2d187 bhyve: Remove unused return value from spinup_ap.
Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37641
2022-12-21 10:31:02 -08:00
John Baldwin
007d9ca5dd bhyve: Remove handler for VM_EXITCODE_SPINUP_AP.
Since commit 0bda8d3e9f, bhyve always enables VM_EXITCODE_IPI exits
instead, so this handler is no longer used.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37640
2022-12-21 10:30:45 -08:00
Sergey A. Osokin
bb1f0401d6 bsd-family-tree: macOS 13 added
MFC after:	3 days
2022-12-21 12:02:49 -05:00
Ruslan Bukin
dc08d52d1e smmu: fix FDT and !FDT builds.
Reviewed by:	andrew
Sponsored by:	UKRI
Differential Revision:	https://reviews.freebsd.org/D37762
2022-12-21 15:53:09 +00:00
Ruslan Bukin
4b4e8cb53a smmu: set guest address space range to 48-bit, which is a hardware
limit in our configuration.

Reviewed by:	andrew
Sponsored by:	UKRI
Differential Revision:	https://reviews.freebsd.org/D37756
2022-12-21 15:53:05 +00:00
Søren Schmidt
e00b6e254f Attach Motorcomm YT8511 GbE PHY driver to the build. 2022-12-21 14:39:05 +00:00
Justin Hibbits
402810d32e Convert iflib(4) and iflib-based drivers to the DrvAPI
Summary:
Convert iflib(4) and the following drivers:
* axgbe
* em
* ice
* ixl
* vmxnet

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	kbowling, #iflib
Differential Revision: https://reviews.freebsd.org/D37768
2022-12-21 09:20:06 -05:00
Andrew Turner
7ebc4c9bf7 Use hwreset_array in the Rockchip tsadc driver
The order of asserting/deasserting the resets doesn't matter so use
the new hwreset_array to manage them all.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37358
2022-12-21 11:25:27 +00:00
Andrew Turner
969935b86b Add support for an array of hwresets
In some drivers we need to assert and deassert a group of hardware
resets in any order. To support this add a new hwreset_array that
manages all hwresets defined for a device.

Reviewed by:	bz, manu, mmel
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37357
2022-12-21 11:25:23 +00:00
Kirk McKusick
52011f5f92 Format cleanups.
No functional change intended.

Differential Revision: https://reviews.freebsd.org/D33424
2022-12-20 18:30:36 -08:00
Zhenlei Huang
21ad3e27fa jail: Fix output of IPv[46] addresses of DDB show prison
Reviewed by:	melifaro, jamie
Approved by:	kp (mentor)
Fixes:		eb8dcdeac2 jail: network epoch protection for IP address lists
Differential Revision:	https://reviews.freebsd.org/D37732
2022-12-21 09:53:28 +08:00
Zhenlei Huang
ab591c874b netlink: Use NET_EPOCH_[CALL|WAIT] macros
Reviewed by:	melifaro, kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D37730
2022-12-21 09:40:05 +08:00
Zhenlei Huang
73336a6fd8 routing: Use NET_EPOCH_[CALL|WAIT] macros
Reviewed by:	melifaro, kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D37729
2022-12-21 09:33:31 +08:00
Zhenlei Huang
2e543af13a geom_part: Fix potential integer overflow when checking size of the table
`hdr_entries` and `hdr_entsz` are both uint32_t as defined in UEFI spec.
Current spec does not have upper limit of the number of partition
entries and the size of partition entry, it is potential that malicious
or corrupted GPT header read from untrusted source contains large size of
entry number or size.

PR:		266548
Reviewed by:	oshogbo, cem, imp, markj
Approved by:	kp (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36709
2022-12-21 09:04:30 +08:00
John Baldwin
54f3a781a2 .github: Switch to v3 of actions/checkout.
GitHub is emitting a warning that v2 is deprecated due to using
Node.js 12.

Reported by:	GitHub
Reviewed by:	arichardson, emaste
Differential Revision:	https://reviews.freebsd.org/D37769
2022-12-20 16:27:17 -08:00
Justin Hibbits
5674838159 inet6: Fix LINT build
mli_delete_locked() is the only function that takes a const ifnet.
Since it's a static function there's no advantage to keeping it const.
Since `if_t` is not a const struct (currently) the compiler throws an
error passing the ifp around to ifnet functions.

Fixes:		eb1da3e525
Sponsored by:	Juniper Networks, Inc.
2022-12-20 15:23:49 -05:00
John Baldwin
3845cce70d ktls_tests: Ignore errors from close for receive error tests.
For tests that send invalid data to a TLS socket to trigger read
errors the kernel may end up dropping the connection before close is
called at the conclusion of the test resulting in spurious ECONNRESET
errors from close.  Ignore any errors from close for these tests.

PR:		268390
Reported by:	olivier, Michal Gulbicki <michalx.gulbicki@intel.com>
Reviewed by:	markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D37717
2022-12-20 11:38:28 -08:00
John Baldwin
f0c143b356 ktls_tests: Ignore spurious errors from shutdown(2).
For some of the "bad size" tests, the remote end can notice the error
and drop the connection before the test program returns from write to
call shutdown.  In that case, shutdown fails with ENOTCONN.  Permit
these ENOTCONN errors without failing the test.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D37693
2022-12-20 11:38:07 -08:00
Justin Hibbits
177034c44e Update DrvAPI convert script for new KPIs
Bring the DrvAPI convert script forward from the initial commit to
account for the last 8 years of changes to the KPIs.

Sponsored by:	Juniper Networks, Inc.
2022-12-20 11:18:50 -05:00
Justin Hibbits
eb1da3e525 DrvAPI: Extend driver KPI with more accessors
Summary:
Add the following accessors to hide some more netstack details:
* if_get/setcapabilities2 and *bits analogue
* if_setdname
* if_getxname
* if_transmit - wrapper for call to ifp->if_transmit()
- This required changing the existing if_transmit to
if_transmit_default, since that's its purpose.
* if_getalloctype
* if_getindex
* if_foreach_addr_type - Like if_foreach_lladdr() but for any address
  family type.  Used by some drivers to iterate over all AF_INET
  addresses.
* if_init() - wrapper for ifp->if_init() call
* if_setinputfn
* if_setsndtagallocfn
* if_togglehwassist

Reviewers: #transport, #network, glebius, melifaro

Reviewed by:	#network, melifaro
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37664
2022-12-20 11:18:50 -05:00
Justin Hibbits
e81fcbece8 ipfw: Constify name argument for hash lookup
The name doesn't get modified, and it gets passed through to a hash
function that accepts only a const pointer.  Const it for correctness.

Sponsored by:	Juniper Networks, Inc.
2022-12-20 11:18:49 -05:00
Stuart McLaren
68ca3a1553
uart(4): Add support for AMT virtual serial port (C610/X99 series)
PR:		267053
MFC after:	3 days
2022-12-20 23:56:00 +08:00
Peter Holm
ae521fda89 stress2: Added link to problem found 2022-12-20 10:12:41 +01:00
Peter Holm
eeabf9cb93 stress2: Fix long run time 2022-12-20 10:12:01 +01:00
Søren Schmidt
1d8c07b7ab Get clocks for Rockchip RK3568. 2022-12-20 08:53:58 +00:00
Alfredo Dal'Ava Junior
b13110e9f3 ufs/ffs: detect endian mismatch between machine and filesystem
Mount on a LE machine a filesystem formatted for BE is not supported
currently. This adds a check for the superblock magic number using
swapped bytes to guess and warn the user that it may be a valid
superblock but endian is incompatible.

MFC after:	2 weeks
Reviewed by:	mckusick
Obtained from:	mckusick, alfredo
Differential Revision: https://reviews.freebsd.org/D37675
2022-12-20 00:20:11 -03:00
Søren Schmidt
e7815784cc Add Rockchip RK3568 SoC
Attach its clock drivers and rk817 pmic driver to the build.
2022-12-20 03:01:41 +00:00
Dag-Erling Smørgrav
9a5acf365d nvme: Clear the notify flag if the consumer rejects the controller.
While here, fix some type mismatch warnings.

Reviewed by:	imp
Sponsored by:	Netapp, Inc.
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-12-20 02:53:38 +01:00
Ruslan Bukin
54b96380f5 Add support for ARM System Control and Management Interface (SCMI) v3.1.
The SCMI specification describes a set of standard interfaces for power,
performance and system management.

SCMI is extensible and provides interfaces to access functions which are
often implemented in firmwares in the System Control Processor (SCP).

This implements Shared Memory-based transfer, which is one of the ways on
how messages are exchanged between agents and the platform.

This includes a driver for ARM Message Handling Unit (MHU) Doorbell, which
is a mechanism that the caller can use to alert the callee of the presence
of a message.

The support implements clock management interface. For instance this allows
us to control HDMI pixel clock on ARM Morello Board.

Tested on ARM Morello Board.

Obtained from: CheriBSD
Differential Revision:	https://reviews.freebsd.org/D37316
Reviewed by:	manu
Sponsored by:	UKRI
2022-12-19 22:28:21 +00:00
Ceri Davies
8183df7f00 mount_nullfs.8: Bump .Dd for file mounts update. 2022-12-19 18:58:39 +00:00
Ed Maste
766145637d readelf: match GNU readelf formatting
GNU readelf emits a blank line before, and uses single quotes around the
symbol table name, in each "Symbol table 'name' contains ## entries"
header.

Reviewed by:	markj
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37746
2022-12-19 12:57:41 -05:00
Doug Rabson
71e9be1bd5 Don't allow stacking of file mounts
Reviewed by:    mjg, kib
Tested by:      pho
2022-12-19 16:46:27 +00:00