Commit Graph

280912 Commits

Author SHA1 Message Date
Warner Losh
f051d72314 hyperv: Build and install where supported
Remove the hard-coded dependency on HYPERV being only x86. Instead, 100%
rely on MK_HYPERV. It's always right (since it's marked BROKEN (so set
to "no") on architectures we don't support).

Sponsored by:		Netflix
Reviewed by:		bz
Differential Revision:	https://reviews.freebsd.org/D38306
2023-02-01 10:21:57 -07:00
Wei Hu
ea11861e43 arm64: Hyper-V: vPCI: Enabling v-PCI in FreeBSD in ARM64 Hyper-V
This patch does remaining enablement in hyperv vpci driver to work
on arm64 Hyper-V. For that it required to use PCI protocol 1.4 and
corresponding different PCI message handling. Also new MSI allocation,
MSI-X mapping, release.

This is the last patch of total three patches to enalbe Hyper-V vPCI
support in arm64.

Reviewed by:	whu
Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Obtained from:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D37958
2023-02-01 16:59:27 +00:00
Stefan Eßer
1e0853ee84 sys/kbio.h: support Unicode key codes in vt keymap files
Some keyboard definitions return Unicode characters that cannot be
represented in the 8 bits provided by an u_char.

Extend then width of the keycode entries to 16 bits to allow for all
keycodes currently defined in share/vt/keymaps/*,kbd.

Reported by:	   yuri@aetern.org
MFC after:	   3 days
2023-02-01 17:24:18 +01:00
Krzysztof Zdziarski
c0a4a7bb94 qat: Fixed Coverity reported issue
This patch provides fixes for following Coverity issues:
CID 1504073
CID 1504075
CID 1504076
CID 1504077

Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com>
Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com>
Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com>
Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com>
Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com>
Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com>

Fixes:		a977168c48 ("qat: Add Intel® 4xxx Series platform support")
Reviewed by:	markj
Sponsored by:   Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38339
2023-02-01 11:02:08 -05:00
Wei Hu
6e5b082cab arm64: Hyper-V: vPCI: Adding Hyper-V PCI protocol 1.4
This is enabling the PCI protocol 1.4 and corresponding structures
in order to support arm64 Hyper-V.

This is the 2nd of the three patches to enable Hyper-V vPCI support
in arm64.

Reviewed by:	whu
Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Obtained from:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D37780
2023-02-01 16:00:10 +00:00
Wei Hu
db247798c5 arm64: Hyper-V: vPCI: SPI MSI mapping for gic v3 acpi in arm64
Microsoft Azure Hyper-V uses SPI to map MSI in ARM64, instead of
using LPI IDS. To enable that we need to have gic registered with
ACPI_MSI_XREF and gic acpi to map SPI for MSI.

This is the 1st of the three patchs to enable Hyper-V vPCI support
in arm64.

Reviewed by:	andrew, emaste, whu
Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Obtained from:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D37763
2023-02-01 15:40:08 +00:00
Dmitry Chagin
5c32146723 amd64: Eliminate write only cpu_fxsr.
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D38289
MFC after:		1 week
2023-02-01 18:17:06 +03:00
Mateusz Piotrowski
197947e0a3 ifconfig.8: Improve readability of vlanproto's description
Sponsored by:	Klara Inc.
MFC after:	1 week
2023-02-01 16:06:45 +01:00
Corvin Köhne
892feec221
vmm: avoid spurious rendezvous
A vcpu only checks if a rendezvous is in progress or not to decide if it
should handle a rendezvous. This could lead to spurios rendezvous where
a vcpu tries a handle a rendezvous it isn't part of. This situation is
properly handled by vm_handle_rendezvous but it could potentially
degrade the performance. Avoid that by an early check if the vcpu is
part of the rendezvous or not.

At the moment, rendezvous are only used to spin up application
processors and to send ioapic interrupts. Spinning up application
processors is done in the guest boot phase by sending INIT SIPI
sequences to single vcpus. This is known to cause spurious rendezvous
and only occurs in the boot phase. Sending ioapic interrupts is rare
because modern guest will use msi and the rendezvous is always send to
all vcpus.

Reviewed by:		jhb
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D37390
2023-02-01 12:36:36 +01:00
Gregory Neil Shapiro
17c8213559 Note upgrade to sendmail 8.17.1 2023-02-01 02:23:02 +00:00
Gregory Neil Shapiro
38c2f8fe62 Note upgrade to sendmail 8.17.1 2023-02-01 02:22:39 +00:00
Bjoern A. Zeeb
b0ddb44fd4 LinuxKPI: 802.11: fix indent in lkpi_wake_tx_queues()
Fix indentation in lkpi_wake_tx_queues().
No functional changes.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 23:12:30 +00:00
Bjoern A. Zeeb
3dd980267f LinuxKPI: 802.11: enhance lkpi_scan_ies_add() for HT and VHT
Add code (currently disabled by #ifdef) for HT and VHT to
lkpi_scan_ies_add().  Switch to a local variable for ic given
the new code also needs the value.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 23:00:28 +00:00
Jean-Sébastien Pédron
a83b3ec719
linuxkpi: list_sort()'s callback now takes list arguments
This change breaks the API of `list_sort()`. `LINUXKPI_VERSION >= 51300`
is used to keep the header compatible with both versions of the
prototype.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D38082
2023-01-31 23:36:33 +01:00
Eric Joyner
5354596764
vtd: Increase DRHD_MAX_UNITS
Observed on a couple Ice Lake-SP platforms (Intel Coyote Pass, Dell
R750), there are more than 8 DRHD sections enumerated in the DMAR ACPI
section.  Since the previous limit was 8, this resulted in some of these
not being parsed by vtd when the iommu is initialized; in this case when
PCI devices are being passthru'd to a bhyve VM.

This omission later causes a kernel panic later in initialization when
devices could not be found in a valid DRHD scope because the DHRD
containing the device's scope was not added to vtd.

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

PR:		268486
Sponsored by:	Intel Corporation
Reviewed by:	rew@, corvink@
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D38285
2023-01-31 13:57:42 -08:00
Justin Hibbits
dc57ec3ca0 Mechanically convert ffec(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37836
2023-01-31 16:26:36 -05:00
Justin Hibbits
13f2ef1637 Mechanically convert mwl(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37840
2023-01-31 16:26:35 -05:00
Justin Hibbits
9f012efb63 Mechanically convert gem(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37809
2023-01-31 16:26:35 -05:00
Justin Hibbits
3df047e3f3 Mechanically convert ps3 if_glc(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37792
2023-01-31 16:26:35 -05:00
Justin Hibbits
44e65355a3 Mechanically convert if_cas(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37793
2023-01-31 16:26:34 -05:00
Justin Hibbits
98fe10c8fc Mechanically convert mge(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37833
2023-01-31 16:26:34 -05:00
Justin Hibbits
b7459fb0ad Mechanically convert genet(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37832
2023-01-31 16:26:34 -05:00
Justin Hibbits
ad06fc3283 re(4): Fix whitespace from IfAPI conversion
Fixes:		4519a073c3
Sponsored by:	Juniper Networks, Inc.
2023-01-31 16:26:33 -05:00
Justin Hibbits
74c592c047 etherswitch: Clean up whitespace after IfAPI conversion
Sponsored by:	Juniper Networks, Inc.
Fixes:		2e6a8c1ae
2023-01-31 16:26:33 -05:00
Justin Hibbits
34d5a6a3dc Last change for mgb(4) needed for IfAPI conversion
Sponsored by:	Juniper Networks, Inc.
2023-01-31 16:26:33 -05:00
Justin Hibbits
087f0d352a Mechanically convert bge(4) to DrvAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37842
2023-01-31 15:02:18 -05:00
Justin Hibbits
56c1eafe50 IfAPI: Finish conversion of bnxt(4) to IfAPI.
Sponsored by:	Juniper Networks, Inc.
2023-01-31 15:02:18 -05:00
Justin Hibbits
4519a073c3 Mechanically convert if_re(4) to DrvAPI
Reviewed By:	kevlo
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37790
2023-01-31 15:02:18 -05:00
Justin Hibbits
d79539e6f2 IfAPI: Add if_altq_is_enabled() interface.
Summary:
The only user of the ALTQ_IS_ENABLED() in a driver checks against the
ifnet queue.  Abstract that all out and present the interface to check
if ALTQ is enabled on the interface.

Sponsored by:	Juniper Networks, Inc.
Reviewed By:	glebius
Differential Revision: https://reviews.freebsd.org/D38204
2023-01-31 15:02:17 -05:00
Justin Hibbits
31cfaf191b IfAPI: Add l2com accessor for firewire.
Summary:
Firewire is the only device driver that accesses the l2com member, all
other accesses are handled within the netstack itself.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius, melifaro
Differential Revision: https://reviews.freebsd.org/D38203
2023-01-31 15:02:17 -05:00
Justin Hibbits
0d2684e15e IfAPI: Add some more accessors
Summary:
* if_setreassignfn for wireguard.
* if_getinputfn() and if_getstartfn() for various drivers.  Use the
  function descriptor typedefs for these and the setters.
* vlantrunk accessor.  This is used by VLAN_CAPABILITIES() used by
  several drivers, as well as directly by mxge(4).
* if_pcp member accessor, used by cxgbe.
* accessors for netmap adapter.

Sponsored by:	Juniper Networks, Inc.
Reviewed By:	glebius
Differential Revision: https://reviews.freebsd.org/D38202
2023-01-31 15:02:17 -05:00
Justin Hibbits
9507d03bfe IfAPI: Use the ifnet APIs in kern_poll()
The only API used is if_name().

Sponsored by:	Juniper Networks, Inc.
2023-01-31 15:02:16 -05:00
Justin Hibbits
c255d1a401 IfAPI: Add if_llsoftc member accessors for TOEDEV
Summary:
Keep TOEDEV() macro for backwards compatibility, and add a SETTOEDEV()
macro to complement with the new accessors.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius
Differential Revision: https://reviews.freebsd.org/D38199
2023-01-31 15:02:16 -05:00
Justin Hibbits
3d0d5b21c9 IfAPI: Explicitly include <net/if_private.h> in netstack
Summary:
In preparation of making if_t completely opaque outside of the netstack,
explicitly include the header.  <net/if_var.h> will stop including the
header in the future.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius, melifaro
Differential Revision: https://reviews.freebsd.org/D38200
2023-01-31 15:02:16 -05:00
Justin Hibbits
30af2c131b IfAPI: Add if_get/setmaclabel() and use it.
Summary:
Port the MAC modules to use the IfAPI APIs as part of this.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius
Differential Revision: https://reviews.freebsd.org/D38197
2023-01-31 15:02:15 -05:00
Justin Hibbits
113af4fd2b IfAPI: Add if_gettype() API and use it for vlan
Sponsored by:	Juniper Networks, Inc.
Reviewed by:	#network, glebius
Differential Revision: https://reviews.freebsd.org/D38198
2023-01-31 15:02:15 -05:00
Justin Hibbits
950cc1f44f bpf: Add "_if" tap APIs
Summary:
Hide more netstack by making the BPF_TAP macros real functions in the
netstack.  "struct ifnet" is used in the header instead of "if_t" to
keep header pollution down.

Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38103
2023-01-31 15:02:14 -05:00
Justin Hibbits
1bfa548b1f ifnet/API: Privatize the implementation of the drbr_* APIs
When ALTQ is enabled ifnet accessors already need to be called, largely
defeating the purpose of the inline.  To that extent, make the ALTQ form
functions in the netstack proper, and make them always available.

Reviewed By:	glebius
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38104
2023-01-31 15:02:14 -05:00
Justin Hibbits
361ac40b0f IfAPI: Hide the in6m_lookup_locked() implementation.
Summary:
in6m_lookup_locked() iterates over the ifnet's multiaddrs list.  Keep
this implementation detail private, by moving the implementation to the
netstack source from the header.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius, melifaro
Differential Revision: https://reviews.freebsd.org/D38201
2023-01-31 15:02:14 -05:00
Mitchell Horne
537c166b76 elftoolchain: update the list of riscv relocations
A few have been added, a couple removed.

Reviewed by:	jrtc27, imp, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38175
2023-01-31 14:32:40 -04:00
Mitchell Horne
7738bb89a3 elf_common.h: remove obsolete riscv relocations
These were specified at one time, but later removed.

Reviewed by:	jrtc27, imp, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38174
2023-01-31 14:31:48 -04:00
Justin Hibbits
3d100b2a5a Remove dme(4) from files
Fixes:	69759b0c69
2023-01-31 11:44:42 -05:00
Bjoern A. Zeeb
2336248a8b LinuxKPI: 802.11: fix ff76cbc81d (pspoll)
Add the lost "inline".

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
X-MFC with:	ff76cbc81d
2023-01-31 16:41:41 +00:00
Justin Hibbits
69759b0c69 Remove dme(4).
This was used only on an Ingenic MIPS SoC.
2023-01-31 11:39:48 -05:00
Bjoern A. Zeeb
ff76cbc81d LinuxKPI: 802.11: implement ieee80211_is_pspoll()
Implement ieee80211_is_pspoll() and move it up to the set of implemented
ieee80211_is_*() functions.

There are no further changes (git diff just looks weird).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 16:36:24 +00:00
Bjoern A. Zeeb
5a9a0d7803 LinuxKPI: 802.11: basic implementation of *queue(s)/*txq*
Very basic implementations of ieee80211_{wake,stop}_queue[s],
as well as ieee80211_txq_schedule_start(), ieee80211_next_txq(),
and ieee80211_schedule_txq().
Various combinations of these are used by different wireless
drivers, incl. iwlwifi.

Sponsored by:	The FreeBSD Foundation (parts of this work)
MFC after:	3 days
2023-01-31 16:17:14 +00:00
Bjoern A. Zeeb
a839757109 LinuxKPI: 802.11: implement ieee80211_tx_status_ext()
Add an implementation of ieee80211_tx_status_ext() extending the
internal linuxkpi_ieee80211_tx_status() implementation.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 15:35:59 +00:00
Bjoern A. Zeeb
e30e05d3ab LinuxKPI: 802.11: extend linuxkpi_ieee80211_rx()
Extend linuxkpi_ieee80211_rx() by another argument for
the ieee80211_rx_list() implementation (even though the argument
is currently ignored).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 15:05:30 +00:00
Alexander V. Chernikov
e80699a809 netlink: add NETLINK to GENERIC.
This is a followup of 692e19cf51 (add netlink to GENERIC@amd64).

Netlink is a communication protocol defined in RFC 3549. It is async,
TLV-based protocol, providing 1-1 and 1-many communications between kernel
and userland. Netlink is currently used in Linux kernel to modify, read and
subscribe for nearly all networking states. Interface state, addresses, routes,
firewall, rules, fibs, etc, are controlled via Netlink.

Netlink support was added in D36002. It has got a number of improvements and
first customers since then:
* net/bird2 got netlink support, enabling route multipath in FreeBSD
* netlink-based devd notifications are being worked on ( D37574 ).
* linux(4) fully supports and depends on Netlink

Enabling Netlink in GENERIC targets two goals.
The first one is to provide stability for the third-party userland applications,
so they can rely on the fact that netlink always exists since 14.0 and potentially 13.2.
Loadable module makes life of the app delepers harder. For example, `net/bird2` can be
either build with netlink or rtsock support, but not both.

The second goal is to enable gradual conversion of the base userland tools
to use netlink(4) interfaces. Converting tools like netstat (D36529), route,
ifconfig one-by-one simplifies testing and addressing the feedback.
Othewise, switching all base to use netlink at once may be too big of a leap.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D37783
2023-01-31 14:22:11 +00:00
Bjoern A. Zeeb
a3baca22d0 LinuxKPI: 802.11: fix types and whitespace
Correct struct member types, fix whitespace, and remove superfluous
return statements in void functions.

No functional changes.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-01-31 13:39:04 +00:00