| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Simplify the calls into the SMCCC firmware with the new
arm_smccc_invoke* macros.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46987
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.
This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e02 and is handled in D45813 (to be committed
seperately later).
Sponsored by: The FreeBSD Foundation
Reviewed by: markj, kib
Tested by: pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
| |
All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent
to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a
subset of kernel configs")), so it's time we removed the legacy code
that no longer sees much testing and has a significant maintenance
burden.
Reviewed by: jhb, andrew, emaste
Differential Revision: https://reviews.freebsd.org/D32954
|
|
|
|
|
|
|
|
|
|
|
|
| |
The allocation call could result in sleep lock violation if it is in
smp_rendezvous. Move it out. Also move the pcpu memory pointer to
vmbus_pcpu_data since it is only used on Hyper-V.
PR: 279738
Reported by: gbe
Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d
MFC after: 2 weeks
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add boot parameter hw.vmbus.tlb_hcall for tlb flush hypercall.
By default it is set to 1 to allow hyercall tlb flush. It can be
set to 0 in loader.conf to turn off hypercall and use system
provided tlb flush routine.
The change also changes flag in the per cpu contiguous memory
allocation to no wait to avoid panic happened some cases which there
are no enough contiguous memery available at boot time.
Reported by: gbe
Tested by: whu
MFC after: 1 week
Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by: Microsoft
|
|
|
|
|
| |
Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting media to autoselect would always return EOPNOTSUPP.
As autoselect is the only valid media, this change now returns
success instead.
PR: 264253
Reported by: Prakash Shiva <prakashs0234@gmail.com>
Reviewed by: Dexuan Cui <decui microsoft com>, whu
Approved by: whu
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44131
|
|
|
|
|
|
|
|
|
|
| |
The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44130
|
|
|
|
|
|
|
|
|
|
| |
The public bus_adjust_resource() API still accepts both forms, but the
internal kobj method no longer passes the argument. Implementations
which need the type now use rman_get_type() to fetch the value from
the allocated resource.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The msi address contains apic id. The code in vmbus_pcib_map_msi()
treats it as cpu id, which could cause mis-configuration of msix
IRQs, leading to missing interrupts for SRIOV devices. This happens
when apic id is not the same as cpu id on certain large VM sizes
with multiple numa domains in Azure. Fix this issue by correctly
mapping apic ids to cpu ids.
On vPCI version before 1.4, it only supports up to 64 vcpus
for msi/msix interrupt. This change also adds a check and returns
error if the vcpu_id is greater than 63.
Reported by: NetApp
Tested by: whu
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
- s/managment/management/
- s/transacion/transaction/
Obtained from: NetBSD
MFC after: 3 days
|
|
|
|
|
|
| |
Specifically for bus_activate/adjust/deactivate_bus methods.
Differential Revision: https://reviews.freebsd.org/D43431
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disassemble a one-for-all soshutdown() into protocol specific methods.
This creates a small amount of copy & paste, but makes code a lot more
self documented, as protocol specific method would execute only the code
that is relevant to that protocol and nothing else. This also fixes a
couple recent regressions and reduces risk of future regressions. The
extended KPI for the new pr_shutdown removes need for the extra pr_flush
which was added for the sake of SCTP which could not perform its shutdown
properly with the old one. Particularly for SCTP this change streamlines
a lot of code.
Some notes on why certain parts of code were copied or were not to certain
protocols:
* The (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING) check is
needed only for those protocols that may be connected or disconnected.
* The above reduces into only SS_ISCONNECTED for those protocols that
always connect instantly.
* The ENOTCONN and continue processing hack is left only for datagram
protocols.
* The SOLISTENING(so) block is copied to those protocols that listen(2).
* sorflush() on SHUT_RD is copied almost to every protocol, but that
will be refactored later.
* wakeup(&so->so_timeo) is copied to protocols that can make a non-instant
connect(2), can SO_LINGER or can accept(2).
There are three protocols (netgraph(4), Bluetooth, SDP) that did not have
pr_shutdown, but old soshutdown() would still perform sorflush() on
SHUT_RD for them and also wakeup(9). Those protocols partially supported
shutdown(2) returning EOPNOTSUP for SHUT_WR/SHUT_RDWR, now they fully lost
shutdown(2) support. I'm pretty sure netgraph(4) and Bluetooth are okay
about that and SDP is almost abandoned anyway.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43413
|
|
|
|
|
| |
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955
|
|
|
|
|
|
| |
- s/recieved/received/
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just like it was done for accept(2) in cfb1e92912b4, use same approach
for two simplier syscalls that return socket addresses. Although,
these two syscalls aren't performance critical, this change generalizes
some code between 3 syscalls trimming code size.
Following example of accept(2), provide VNET-aware and INVARIANT-checking
wrappers sopeeraddr() and sosockaddr() around protosw methods.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D42694
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let the accept functions provide stack memory for protocols to fill it in.
Generic code should provide sockaddr_storage, specialized code may provide
smaller structure.
While rewriting accept(2) make 'addrlen' a true in/out parameter, reporting
required length in case if provided length was insufficient. Our manual
page accept(2) and POSIX don't explicitly require that, but one can read
the text as they do. Linux also does that. Update tests accordingly.
Reviewed by: rscheff, tuexen, zlei, dchagin
Differential Revision: https://reviews.freebsd.org/D42635
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QEMU emulates Hyper-V [1] but lacks the emulation for vmbus_res, thus no
coherence information is available. Add NULL check for it and fallback
to no coherence. This will prevent FreeBSD guests from panic on QEMU
with the Hyper-V enlightenment hv-synic enabled.
For real Hyper-V, both gen1 and gen2 have vmbus_res then they are not
affected by this change.
1. https://www.qemu.org/docs/master/system/i386/hyperv.html
PR: 274810
Reviewed by: mhorne, emaste, delphij, whu
Diagnosed by: mhorne
Fixes: e7a9817b8d32 Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus
Insta-MFC approved by: re (delphij) for 14.0-RC4
Differential Revision: https://reviews.freebsd.org/D42414
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is observed that netvsc's send rings could stall on the latest
Azure Boost platforms. This is due to vmbus_rxbr_read() routine
doesn't check if host is waiting for more room to put data, which
leads to host side sleeping forever on this vmbus channel. The
problem was only observed on the latest platform because the host
requests larger buffer ring room to be available, which causes
the issue to happen much more easily.
Fix this by adding check in the vmbus_rxbr_read call and signaling
the host in the callers if check returns positively.
Reported by: NetApp
Tested by: whu
MFC after: 3 days
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
|
| |
An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a new IfAPI that could deal with a NULL bpf, if such
could occur in the network stack.
Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42082
|
|
|
|
|
|
| |
This reverts commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf.
Commit message needs revised.
|
|
|
|
|
|
|
|
|
|
|
| |
An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a new IfAPI that includes a NULL check. Since this API
is used in only a handful of locations, it reduces the the NULL check
scope over inserting the check into bpf_peers_present().
Sponsored by: Juniper Networks, Inc.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ARM64 Hyper-V UFS filesystem is getting corruption and those
corruptions are consistently happening just after hitting a page
boundary. It is unable to correctly read disk blocks into buffers
that are not aligned to 512-byte boundaries.
It happens because storvsc needs physically contiguous memory which
may not be the case when bus_dma needs to create a bounce buffer.
This can happen when the destination is not cache-line aligned.
Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices
that are added dynamically via the VMbus protocol and are not
represented in the ACPI DSDT. Only the top level VMbus node exists
in the DSDT. As such, on ARM64 these devices don't pick up coherence
information and default to not hardware coherent.
PR: 267654, 272666
Reviewed by: andrew, whu
Tested by: lwhsu
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D41728
|
|
|
|
|
|
|
|
|
|
| |
This message is not very useful when things are working well.
Flip its meaning and let it only be emitted on failure.
While here, pet style(9).
Reviewed by: mhorne, whu
Differential Revision: https://reviews.freebsd.org/D41788
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current code in hn/netvsc tries to merge (logical AND) VF and
its own capability bits when a VF is attached. This results in
losing some key VF features, especially in tx path. For example,
the VF's txcsum, rxcsum or tso bits could be lost if any of
these are not in hn/netvsc's own capablility field.
Actually when VF is attached, hn just needs to use VF's caps
as all the tx packets would be forwarded to the VF interface.
Fix this problem by doing so.
Reported by: whu
Tested by: whu
MFC after: 3 days
Sponsored by: Microsoft
|
|
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
|
|
|
|
|
|
|
| |
Some devices like Apple HID-over-SPI may contain more than one report
descriptors necessitating creation of multiple hidbus children.
Add indentificator of child devices to distinct them.
No functional changes intended.
Differential Revision: https://reviews.freebsd.org/D41246
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running VM on ARM64 Hyper-V, we have seen netvsc/hn driver hit
assert on reading duplicated network completion packets over vmbus
channel or one of the tx channels stalls completely. This seems to
caused by processor reordering the instructions when vmbus driver
reading or updating its channel ring buffer indexes.
Fix this by using load acquire and store release instructions to
enforce the order of these memory accesses.
PR: 271764
Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Tested by: whu
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Vmbus_synic_setup() is invoked via vmbus_intrhook -> vmbus_doattach
-> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't
functional in intrhooks and smp_rendezvous() will just call
vmbus_synic_setup() on the boot processor. There's nothing that will
initialize the pcpu data on every other AP.
To fix it we need to use SI_SUB_SMP for vmbus_doattach(). With this
patch the vmbus interrupt should work on all arm64 cpus on HyperV.
Reported by: kevans
Reviewed by: kevans, whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Obtained from: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D40279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the Hyper-V drivers we need to allocate buffers shared between the
host and guest. This memory has been allocated with bus_dma, however
it doesn't use this correctly, e.g. it is missing calls to
bus_dmamap_sync. Along with this on arm64 we need this memory to be
mapped with the correct memory type that bus_dma may not use.
Switch to contigmalloc to allocate this memory as this will correctly
allocate cacheable memory.
Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40227
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Coverity reports the use of two uninitialized variables in the hyperv
driver. Examination shows the variables can be accessed while
uninitialized in error cases. Fix both.
CID: 1365235
CID: 1365236
Sponsored by: Dell Technologies
MFC after: 1w
Test Plan: Changes in use at $WORK
Reviewers: robert.herndon_dell.com, vangyzen, bret_ketchum_dell.com
Subscribers: imp, badger
Differential Revision: https://reviews.freebsd.org/D38551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.
This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.
New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.
This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.
The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).
This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D38465
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.
This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.
Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.
Reviewed by: imp, brooks
Approved by: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38381
|
|
|
|
|
|
|
|
|
| |
Hyper-V HID driver using hidbus/hms.
Reviewed by: wulf
MFC after: 1 week
PR: 221074
Differential revision: https://reviews.freebsd.org/D38140
|
|
|
|
|
|
|
|
| |
Remove FreeBSD 11 and earlier support
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
|
|
|
|
|
|
|
|
|
| |
Fix a typo and some indentation errors in the previous commits.
Reported by: jrtc27
Fixes: db247798c5640 ("arm64: Hyper-V: vPCI: SPI MSI mapping for gic v3 acpi in arm64")
Fixes: 6e5b082cab8d9 ("arm64: Hyper-V: vPCI: Adding Hyper-V PCI protocol 1.4")
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of various keyboard drivers.
EVIOCGRAB ioctl execution on /dev/input/event# device node gains
exclusive access to this device to caller. It is used mostly for
development purposes and remote control software. See e.g.
https://reviews.freebsd.org/D30020 which is the reason of creation
of this change.
Keyboard grabbing is disabled in KDB and during panics.
MFC with: 4a0db5e2920c
Tested by: corvink
Differential revision: https://reviews.freebsd.org/D30542
|
|
|
|
|
|
|
|
| |
Makeing the interrupt MP safe.
Reviewed by: andrew
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D37222
|
|
|
|
|
|
|
|
|
|
|
| |
In non-Hyper-V systems during Hyper-V initialization, system
initialization was getting hung, as hyperv_identify(),
was returning successful irrespective of the type of the platform.
Reviewed by: andrew, whu
Fixes: 9729f076e4d
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D37219
|