#
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 ...
|
#
8c4ee0b2 |
| 23-Nov-2023 |
Alexander Motin <mav@FreeBSD.org> |
Use xpt_path_sbuf() in few drivers
xpt_path_string() is now a wrapper around xpt_path_sbuf(). Using it to than concatenate result to another sbuf makes no sense. Just call xpt_path_sbuf() directly
Use xpt_path_sbuf() in few drivers
xpt_path_string() is now a wrapper around xpt_path_sbuf(). Using it to than concatenate result to another sbuf makes no sense. Just call xpt_path_sbuf() directly.
MFC after: 1 month
show more ...
|
Revision tags: release/14.0.0 |
|
#
180c0240 |
| 18-Sep-2023 |
Mina Galić <freebsd@igalic.co> |
virtio: remove virtio_alloc_virtqueues' flags arg
Summary: the flags argument is unused. Its initial design idea has been superceded by the addition of virtio_setup_intr and related APIs.
Sponsored
virtio: remove virtio_alloc_virtqueues' flags arg
Summary: the flags argument is unused. Its initial design idea has been superceded by the addition of virtio_setup_intr and related APIs.
Sponsored by: The FreeBSD Foundation
Reviewers: bryanv
Reviewed By: bryanv
Subscribers: cognet, imp
Differential Revision: https://reviews.freebsd.org/D41850
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
5c4c96d3 |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
virtio: Remove unused devclass arguments to DRIVER_MODULE.
|
#
b25ddb78 |
| 14-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
virtio: Use __diagused for variables only used in KASSERT().
|
Revision tags: release/12.3.0 |
|
#
5b81e2e1 |
| 17-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
virtio_scsi: Zero stack-allocated CCBs
Fixes: 3394d4239b ("cam: allocate CCBs from UMA for SCSI and ATA IO") Reported by: syzbot+2e9ce63919709feb3d1c@syzkaller.appspotmail.com Reviewed by: trasz Spo
virtio_scsi: Zero stack-allocated CCBs
Fixes: 3394d4239b ("cam: allocate CCBs from UMA for SCSI and ATA IO") Reported by: syzbot+2e9ce63919709feb3d1c@syzkaller.appspotmail.com Reviewed by: trasz Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/13.0.0 |
|
#
633218ee |
| 21-Jan-2021 |
Jessica Clarke <jrtc27@FreeBSD.org> |
virtio: Reduce boilerplate for device driver module definitions
Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare b
virtio: Reduce boilerplate for device driver module definitions
Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare both, merge VIRTIO_SIMPLE_PNPTABLE with VIRTIO_SIMPLE_PNPINFO and make the latter register for both buses. This also has the benefit of abstracting away the available transports and their names.
Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28073
show more ...
|
#
e6cc42f1 |
| 19-Jan-2021 |
Bryan Venteicher <bryanv@FreeBSD.org> |
virtio: Handle possible failure of virtio_finalize_features()
Try to standardize how drivers negotiate feature and the function names
Reviewed by: grehan (mentor) Differential Revision: https://rev
virtio: Handle possible failure of virtio_finalize_features()
Try to standardize how drivers negotiate feature and the function names
Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27930
show more ...
|
#
15be4953 |
| 19-Jan-2021 |
Bryan Venteicher <bryanv@FreeBSD.org> |
virtio_scsi: Add modern (V1) support
Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27903
|
#
cd853791 |
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
Revision tags: release/12.2.0 |
|
#
068dbf36 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
virtio: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
a1da7a46 |
| 07-May-2020 |
Jessica Clarke <jrtc27@FreeBSD.org> |
virtio: Support MMIO bus for all devices
The bus is independent of the device, so all devices can be attached to either a PCI bus or an MMIO bus. For example, QEMU's virtio-rng-device gives the MMIO
virtio: Support MMIO bus for all devices
The bus is independent of the device, so all devices can be attached to either a PCI bus or an MMIO bus. For example, QEMU's virtio-rng-device gives the MMIO variant of virtio-rng-pci, and is now detected.
Reviewed by: andrew, br, brooks (mentor) Approved by: andrew, br, brooks (mentor) Differential Revision: https://reviews.freebsd.org/D24730
show more ...
|
#
051669e8 |
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
#
adbf6af7 |
| 23-Jan-2020 |
Andriy Gapon <avg@FreeBSD.org> |
virtio_scsi: use max target ID plus one as the initiator ID
This bus does not really have a concept of the initiator ID, so use a guaranteed dummy one that won't conflict with any real target.
This
virtio_scsi: use max target ID plus one as the initiator ID
This bus does not really have a concept of the initiator ID, so use a guaranteed dummy one that won't conflict with any real target.
This change fixes a problem with virtio_scsi on GCE where disks get sequential target IDs starting from one. If there are seven or more disks, then a disk with the target ID of seven would not be discovered by FreeBSD as that ID was reserved as the initiator ID -- see scsi_scan_bus().
Discussed with: bryanv MFC after: 2 weeks Sponsored by: Panzura
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7f49ce7a |
| 28-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349476
Sponsored by: The FreeBSD Foundation
|
#
df840654 |
| 22-Jun-2019 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
VirtIO SCSI: validate seg_max on attach
Until r349278, bhyve presented a seg_max to the guest that was too large. Detect this case and clamp it to the virtqueue size. Otherwise, we would fail the
VirtIO SCSI: validate seg_max on attach
Until r349278, bhyve presented a seg_max to the guest that was too large. Detect this case and clamp it to the virtqueue size. Otherwise, we would fail the "too many segments to enqueue" assertion in virtqueue_enqueue().
I hit this by running a guest with a MAXPHYS of 256 KB.
Reviewed by: bryanv cem MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20703
show more ...
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
0f6040f0 |
| 04-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio(4): Add PNP match metadata for virtio devices
Register MODULE_PNP_INFO for virtio devices using the newbus PNP information provided by the previous commit. Matching can be quite simple; exis
virtio(4): Add PNP match metadata for virtio devices
Register MODULE_PNP_INFO for virtio devices using the newbus PNP information provided by the previous commit. Matching can be quite simple; existing probe routines only matched on bus (implicit) and device_type. The same matching criteria are retained exactly, but is now also available to devmatch(8).
Reviewed by: bryanv, markj; imp (earlier version) Differential Revision: https://reviews.freebsd.org/D20407
show more ...
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
e5355d33 |
| 12-Apr-2019 |
Alexander Motin <mav@FreeBSD.org> |
Fix SCSI sense data pass through.
MFC after: 1 week Sponsored by: iXsystems, Inc.
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
91b95f3d |
| 04-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311132 through r311305.
|
#
4195c7de |
| 04-Jan-2017 |
Alan Somers <asomers@FreeBSD.org> |
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/c
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field.
PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038
show more ...
|