Revision tags: release/14.2.0, release/13.4.0 |
|
#
b72ae900 |
| 22-Aug-2024 |
Ahmad Khalifa <ahmadkhalifa570@gmail.com> |
sys: make the kernel metadata pointer global
The way we got the kernel metadata pointer was by calling preload_search_by_type with one of the following three: "elf kernel", "elf32 kernel" and "elf64
sys: make the kernel metadata pointer global
The way we got the kernel metadata pointer was by calling preload_search_by_type with one of the following three: "elf kernel", "elf32 kernel" and "elf64 kernel". Which one(s) we used wasn't consistent though. Sometimes we would only try "elf kernel", and other times we would try one of the latter two if the first failed. However, the loader only ever sets "elf kernel" as the kernel type.
Now, the kmdp is a global, preload_kmdp, and it's initialized using preload_initkmdp in machdep.c (or machdep_boot.c on arm/64). preload_initkmdp takes a single boolean argument that tells us whether not finding the kmdp is fatal or not.
Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1394
show more ...
|
#
18250ec6 |
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
Replace calls to bus_generic_attach with bus_attach_children
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
|
#
723da5d9 |
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
Replace calls to bus_generic_probe with bus_identify_children
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
|
#
d1bdc282 |
| 23-Jul-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Deprecate contigfree(9) in favour of free(9)
As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer needed and should not be used anymore. We leave a wrapper for 3rd party code i
Deprecate contigfree(9) in favour of free(9)
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
show more ...
|
#
5b56413d |
| 25-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY
Sponsored by: Netflix
|
#
8415a654 |
| 18-Jul-2024 |
Jessica Clarke <jrtc27@FreeBSD.org> |
Retire non-NEW_PCIB code and remove config option
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 subse
Retire non-NEW_PCIB code and remove config option
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
show more ...
|
#
d0cb4674 |
| 15-Jun-2024 |
Wei Hu <whu@FreeBSD.org> |
Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous
The allocation call could result in sleep lock violation if it is in smp_rendezvous. Move it out. Also move the pcpu memory po
Hyper-V: move memory alloc call for tlb hypercall out of smp_rendezvous
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
show more ...
|
#
e02d20dd |
| 11-Jun-2024 |
Wei Hu <whu@FreeBSD.org> |
Hyper_V: add a boot parameter to tlb flush hypercall
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 loade
Hyper_V: add a boot parameter to tlb flush hypercall
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
show more ...
|
#
fd911ae6 |
| 10-Jun-2024 |
Wei Hu <whu@FreeBSD.org> |
Hyper-V: remove unused alloc_pcpu_ptr()
Fixes: 2b887687edc25bb4553f0d8a1183f454a85d413d Sponsored by: Microsoft
|
#
2b887687 |
| 07-Jun-2024 |
Souradeep Chakrabarti <schakrabarti@microsoft.com> |
Hyper-V: TLB flush enlightment using hypercall
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 hype
Hyper-V: TLB flush enlightment using hypercall
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
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
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.
Remov
sys: Automated cleanup of cdefs and other formatting
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
show more ...
|
Revision tags: release/14.0.0 |
|
#
63bf943d |
| 02-Nov-2023 |
Zhenlei Huang <zlei@FreeBSD.org> |
Hyper-V: vmbus: Add NULL check for vmbus_res
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 coh
Hyper-V: vmbus: Add NULL check for vmbus_res
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
show more ...
|
#
e7a9817b |
| 14-Sep-2023 |
Souradeep Chakrabarti <schakrabarti@microsoft.com> |
Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus
In ARM64 Hyper-V UFS filesystem is getting corruption and those corruptions are consistently happening just after hitting a page boundary. It is
Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus
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
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4f8c634d |
| 07-Jun-2023 |
Wei Hu <whu@FreeBSD.org> |
arm64 Hyper-V: enable Hyper-V SMP for ARM64
Vmbus_synic_setup() is invoked via vmbus_intrhook -> vmbus_doattach -> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't functional in intrh
arm64 Hyper-V: enable Hyper-V SMP for ARM64
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
show more ...
|
#
62f9bcf2 |
| 22-May-2023 |
Andrew Turner <andrew@FreeBSD.org> |
Switch to contigmalloc in the Hyper-V code
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 t
Switch to contigmalloc in the Hyper-V code
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
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
b02a3977 |
| 23-Jun-2022 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
hyperv: purge EOL release compatibility
Remove FreeBSD 11 and earlier support
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.f
hyperv: purge EOL release compatibility
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
show more ...
|
#
9729f076 |
| 27-Oct-2022 |
Souradeep Chakrabarti <schakrabarti@microsoft.com> |
arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)
This is the last part for ARM64 Hyper-V enablement. This includes commone files and make file changes to enable the ARM64 FreeBSD gues
arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)
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
show more ...
|
Revision tags: release/13.1.0 |
|
#
c1cef544 |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
hyperv: Remove unused devclass arguments to DRIVER_MODULE.
|
#
f581847a |
| 15-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
hyperv: scanning locking is using the bus mtx
The scanning code uses Giant to coordinate its accesses to newbus as well as to synchronize a little state within hyperv's vmbus. Switch to the new bus_
hyperv: scanning locking is using the bus mtx
The scanning code uses Giant to coordinate its accesses to newbus as well as to synchronize a little state within hyperv's vmbus. Switch to the new bus_topo_* functions instead of referring to Giant explicitly.
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D31840
show more ...
|
Revision tags: release/12.3.0 |
|
#
ddfc9c4c |
| 23-Jun-2021 |
Warner Losh <imp@FreeBSD.org> |
newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf
Now that the upper layers all go through a layer to tie into these information functions that translates
newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf
Now that the upper layers all go through a layer to tie into these information functions that translates an sbuf into char * and len. The current interface suffers issues of what to do in cases of truncation, etc. Instead, migrate all these functions to using struct sbuf and these issues go away. The caller is also in charge of any memory allocation and/or expansion that's needed during this process.
Create a bus_generic_child_{pnpinfo,location} and make it default. It just returns success. This is for those busses that have no information for these items. Migrate the now-empty routines to using this as appropriate.
Document these new interfaces with man pages, and oversight from before.
Reviewed by: jhb, bcr Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29937
show more ...
|
Revision tags: release/13.0.0 |
|
#
fe7d7ac4 |
| 12-Jan-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
hyperv: register intr handler as usermode-mapped if loaded as module
Normally raw interrupt handler is provided by the kernel text. But vmbus module registers its own handler that needs to be mappe
hyperv: register intr handler as usermode-mapped if loaded as module
Normally raw interrupt handler is provided by the kernel text. But vmbus module registers its own handler that needs to be mapped into userspace mapping on PTI kernels.
Reported and reviewed by: whu Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30310
show more ...
|
#
c05b5848 |
| 10-Dec-2020 |
Bradley T. Hughes <bhughes@FreeBSD.org> |
hyperv/vmbus: avoid crash, panic if vbe fb info is missing
Do not assume that VBE framebuffer metadata can be used. Like with the EFI fb metadata, it may be null, so we should take care not to deref
hyperv/vmbus: avoid crash, panic if vbe fb info is missing
Do not assume that VBE framebuffer metadata can be used. Like with the EFI fb metadata, it may be null, so we should take care not to dereference the null vbefb pointer. This avoids a panic when booting -CURRENT on a gen1 VM in Azure.
Approved by: tsoome Sponsored by: Miles AS Differential Revision: https://reviews.freebsd.org/D27533
show more ...
|
#
cb794182 |
| 30-Nov-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
fix vmbus_fb_mmio_res after r368168
mixed efifb versus vbefb struct use did slip in by mistake.
|
#
a4a10b37 |
| 30-Nov-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
Add VT driver for VBE framebuffer device
Implement vt_vbefb to support Vesa Bios Extensions (VBE) framebuffer with VT. vt_vbefb is built based on vt_efifb and is assuming similar data for initializa
Add VT driver for VBE framebuffer device
Implement vt_vbefb to support Vesa Bios Extensions (VBE) framebuffer with VT. vt_vbefb is built based on vt_efifb and is assuming similar data for initialization, use MODINFOMD_VBE_FB to identify the structure vbe_fb in kernel metadata.
struct vbe_fb, is populated by boot loader, and is passed to kernel via metadata payload.
Differential Revision: https://reviews.freebsd.org/D27373
show more ...
|