| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Makeing the interrupt MP safe.
Reviewed by: andrew
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D37222
|
|
|
|
|
|
| |
Discussed with: whu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's been a report recently of mbufs with data that crosses a page
boundary. It seems those mbufs are generated by the iSCSI target
system:
https://lists.xenproject.org/archives/html/xen-devel/2021-12/msg01581.html
In order to handle those mbufs correctly on netfront use the bus_dma
interface and explicitly request that segments must not cross a page
boundary. No other requirements are necessary, so it's expected that
bus_dma won't need to bounce the data and hence it shouldn't
introduce a too big performance penalty.
Using bus_dma requires some changes to netfront, mainly in order to
accommodate for the fact that now ring slots no longer have a 1:1
match with mbufs, as a single mbuf can use two ring slots if the data
buffer crosses a page boundary. Store the first packet of the mbuf
chain in every ring slot that's used, and use a mbuf tag in order to
store the bus_dma related structures and a refcount to keep track of
the pending slots before the mbuf chain can be freed.
Reported by: G.R.
Tested by: G.R.
MFC: 1 week
Differential revision: https://reviews.freebsd.org/D33876
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that vtblk uses busdma, it keeps important information inside its
request structures. The functions used for kernel dumps synthesize
their own request structures rather than using structures initialized
with the necessary bits for busdma.
Add busdma-bypass paths. Since dumping writes contiguous blocks of
physical memory, vtblk doesn't need busdma in that case.
Reported by: glebius
Tested by: glebius
Differential Revision: https://reviews.freebsd.org/D37243
|
|
|
|
|
|
|
|
|
| |
A distinct number of double-semicolons have ended up in FreeBSD. Take a
pass at getting rid of many of these harmless typos.
Reviewed by: emaste, rrs
Pull Request: https://github.com/freebsd/freebsd-src/pull/609
Differential Revision: https://reviews.freebsd.org/D31716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vcpuHint has been expanded to 16 bit on host side to enable
interruptions to be routed to more CPUs. Guest side should align with
the change.
This change has been tested with hosts with 8-bit and 16-bit vcpuHint,
on both platforms host side can get correct value.
This driver is for ESXi product which only supports x86/x64. They are
little-endian. So there is no need to consider big-endian system.
PR: 264840
Reviewed by: imp@, Zhenlei Huang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ipmi watchdog pretimeout action can trigger unintentionally in
certain rare, complicated situations. What we have seen at Netflix
is that the BMC can sometimes be sent a continuous stream of
writes to port 0x80, and due to what is a bug or misconfiguration
in the BMC software, this results in the BMC running out of memory,
becoming very slow to respond to KCS requests, and eventually being
rebooted by its own internal watchdog. While that is going on in
the BMC, back in the host OS, a number of requests are pending in
the ipmi request queue, and the kcs_loop thread is working on
processing these requests. All of the KCS accesses to process
those requests are timing out and eventually failing because the
BMC is responding very slowly or not at all, and the kcs_loop thread
is holding the IPMI_IO_LOCK the whole time that is going on.
Meanwhile the watchdogd process in the host is trying to pat the
BMC watchdog, and this process is sleeping waiting to get the
IPMI_IO_LOCK. It's not entirely clear why the watchdogd process
is sleeping for this lock, because the intention is that a thread
holding the IPMI_IO_LOCK should not sleep and thus any thread
that wants the lock should just spin to wait for it. My best guess
is that the kcs_loop thread is spinning waiting for the BMC to
respond for so long that it is eventually preempted, and during
the brief interval when the kcs_loop thread is not running,
the watchdogd thread notices that the lock holder is not running
and sleeps. When the kcs_loop thread eventually finishes processing
one request, it drops the IPMI_IO_LOCK and then immediately takes the
lock again so it can process the next request in the queue.
Because the watchdogd thread is sleeping at this point, the kcs_loop
always wins the race to acquire the IPMI_IO_LOCK, thus starving
the watchdogd thread. The callout for the watchdog pretimeout
would be reset by the watchdogd thread after its request to the BMC
watchdog completes, but since that request never processed, the
pretimeout callout eventually fires, even though there is nothing
actually wrong with the host.
To prevent this saga from unfolding:
- when kcs_driver_request() is called in a context where it can sleep,
queue the request and let the worker thread process it rather than
trying to process in the original thread.
- add a new high-priority queue for driver requests, so that the
watchdog patting requests will be processed as quickly as possible
even if lots of application requests have already been queued.
With these two changes, the watchdog pretimeout action does not trigger
even if the BMC is completely out to lunch for long periods of time
(as long as the watchdogd check command does not also get stuck).
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D36555
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- s/assinged/assigned/
MFC after: 3 days
|
|
|
|
|
|
| |
- s/interrutp/interrupt/
MFC after:3 days
|
|
|
|
|
|
| |
- s/interrutps/interrupts/
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Assertions suggest that the loop in iommu_gas_fini_domain is executed
zero times, so remove it.
Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D37204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Maintain a pointer to an element in the domain map that is left of any
sufficiently large free gap in the tree and start the search for free
space there, rather than at the root of the tree. On find_space, move
that pointer to the leftmost leaf in the subtree of nodes with
free_down greater than or equal to the minimum allocation size before
starting the search for space from that pointer. On removal of a node
with address less than that pointer, update that pointer to point to
the predecessor or successor of the removed node.
In experiments with netperf streaming, this reduces by about 40% the
number of map entries examined in first-fit allocation.
Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36624
|
|
|
|
|
|
| |
Reviewed by: kevans, markj, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36913
|
|
|
|
|
|
| |
Reviewed by: kevans, markj, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36912
|
|
|
|
|
|
| |
Reviewed by: kevans, markj, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36911
|
|
|
|
|
|
|
|
|
| |
Kernel sanitizers only support atomic(9) operations.
Reviewed by: kevans, markj, emaste
Reported by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36910
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit brings back the driver from FreeBSD commit
f187d6dfbf633665ba6740fe22742aec60ce02a2 plus subsequent fixes from
upstream.
Relative to upstream this commit includes a few other small fixes such
as additional INET and INET6 #ifdef's, #include cleanups, and updates
for recent API changes in main.
Reviewed by: pauamma, gbe, kevans, emaste
Obtained from: git@git.zx2c4.com:wireguard-freebsd @ 3cc22b2
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36909
|
|
|
|
|
|
|
|
|
| |
When flushing the UART, we need to drain manually if LSR_TEMT is
*not* asserted, aka. if the transmit FIFO is not empty.
Reported by: void <void@f-m.fm>
Fixes: c4b68e7e53bb "ns8250: Check if flush via FCR succeeded"
Differential Revision: https://reviews.freebsd.org/D37185
|
|
|
|
|
|
| |
We don't need to include regdev_if.h when not building for FDT.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
| |
Include sys/bus.h directly rather than depend on header pollution.
While here fix the order of sys/systm.h.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
| |
We only need to include phydev_if.h in phy.c when FDT is enabled and
don't need it at all in phy_usb.c.
Sponsored by: Innovate UK
|
|
|
|
|
|
| |
Rather than depending on header pollution include systm.h directly.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
| |
Include opt_platform.h to get the FDT definition and only include FDT
headers when FDT is defined.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
| |
There is no OFW/FDT specific code in this file so the ofw headers can
be removed.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
| |
The error variable is used in both the ACPI and FDT paths. Declare it
unconditionally.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
This allows drivers that use this to build in an ACPI only kernel.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
- We depend on header polution to include sys/malloc.h. Include it
directly.
- Only define FDT-specific fuctions when building a FDT kernel.
Sponsored by: Innovate UK
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the last part for ARM64 Hyper-V enablement. This includes
commone files and make file changes to enable the ARM64 FreeBSD
guest on Hyper-V. With this patch, it should be able to build
the ARM64 image and install it on Hyper-V.
Reviewed by: emaste, andrew, whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D36744
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
psci_attach is way too late to provide the intended semantics for
psci_present. psci calls can be made immediately after psci_init(),
called way earlier at SI_SUB_CPU + SI_ORDER_FIRST, and we need it to
be valid as early as we can possibly call a psci function.
This fixes booting RPi3+4 with the in-review spintable patch;
rpi3-psci-monitor patches the FDT to add a PSCI node, but it doesn't
patch each cpus' enable-method. Because of this, we would stall the
boot while enabling CPU 1 as we saw a valid looking enable-method and
"no" functional PSCI and attempted to use the spintable rather than
simply not starting secondary APs.
Fixes: 2218070b2c3c32 ("psci: finish psci_present implementation")
Reported by: karels
|
|
|
|
|
|
| |
- s/defult/default/
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Refactor the code to put split the MSR values for x86 and arm64
Hyper-V. Code not yet built. This is one of several patches for
the arm64 Hyper-V enablement.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D37103
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
| |
- s/runnning/running/
MFC after: 2 weeks
|
|
|
|
|
|
| |
- s/faild/failed/
MFC after: 3 days
|
|
|
|
|
|
| |
- s/faild/failed/
MFC after: 5 days
|
|
|
|
|
|
| |
- s/faild/failed/
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
| |
2782ed8f6cd3d7f59219a783bc7fa7bbfb1fe26f fixed the standalone module
build. REmove the now duplicate includes for opt_acpi.h and
opt_platform.h. Als remove the if_mdio.h again in both the Makefile
and the implementation file as it is not (currently) used.
X-MFC with: ba7319e9091b4f6ef15a9c4be3d3d076f3047f72
MFC after: 70 days
|
| |
|
|
|
|
|
|
| |
Reviewed-by: cy
Differential Revision: https://reviews.freebsd.org/D37104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New driver to ACPI generic event device, defined in ACPI spec.
Some ACPI power button may not work without this.
In qemu arm64 with "virt" machine, with ACPI firmware,
enable devd check devd message by
and invoke following command in qemu monitor
(qemu) system_powerdown
and make sure some power button input event appear.
(setting sysctl hw.acpi.power_button_state=S5 is not work,
because ACPI tree does not have \_S5 object.)
Reviewed by: andrew, hrs
Differential Revision: https://reviews.freebsd.org/D37032
|
|
|
|
|
|
|
|
| |
Remove those duplicated lines.
Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Fixes: 6cf00ef80c20148
Sponsored by: Microsoft
|
|
|
|
|
|
| |
Reported by: Henrix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D37081
|
|
|
|
|
|
|
|
| |
Remove those duplicated lines.
Reported by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Fixes: 6cf00ef80c20148
Sponsored by: Microsoft
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second part of the ARM64 Hyper-V enablement.
These changes here are mostly with Make, release changes and also
changes required in vmbus.c hyperv.c and common files in hyperv.
Reviewed by: whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D36467
|
|
|
|
|
|
|
|
|
|
| |
In ARM64 gen2 Hyper-V, use IRQ resource from vmbus_res, which is owning
the IRQ for current device tree. It allows the MMIO resource to be
successfully allocated for vmbus from parent acpi_syscontainer.
Reviewed by: whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D37064
|
|
|
|
|
|
|
| |
This is useful for debugging purposes.
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
|
|
|
|
|
| |
Just to make dmesg look nicer there.
MFC after: 1 week
|
|
|
|
|
| |
Before the change we would get struct tcpcb forward declaration
only with help of pollution via in_pcb.h.
|
|
|
|
|
| |
Reviewed by: np
Differential revision: https://reviews.freebsd.org/D37041
|