| #
d5f55356
|
| 19-Aug-2025 |
Mark Johnston <markj@FreeBSD.org> |
random: Make random_source definitions const
We can do so trivially, so make these tables read-only. No functional change intended.
Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: Storms
random: Make random_source definitions const
We can do so trivially, so make these tables read-only. No functional change intended.
Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52003
show more ...
|
| #
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 ...
|
| #
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 ...
|
| #
f1c5a2e3
|
| 05-Sep-2023 |
John-Mark Gurney <jmg@FreeBSD.org> |
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been returned from an previous fetch during read, just return EAGAIN rather than blocking.
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41656
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 ...
|
| #
5c4c96d3
|
| 06-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
virtio: Remove unused devclass arguments to DRIVER_MODULE.
|
| #
adbf7727
|
| 16-Mar-2022 |
Eugene Grosbein <eugen@FreeBSD.org> |
virtio_random(8): avoid deadlock at shutdown time
FreeBSD 13+ running as virtual guest may load virtio_random(8) driver by means of devd(8) unless the driver is blacklisted or disabled via device.hi
virtio_random(8): avoid deadlock at shutdown time
FreeBSD 13+ running as virtual guest may load virtio_random(8) driver by means of devd(8) unless the driver is blacklisted or disabled via device.hints(5). Currently, the driver may prevent the system from rebooting or shutting down correctly.
This change deactivates virtio_random at very late stage during system shutdown sequence to avoid deadlock that results in kernel hang.
PR: 253175 Tested by: tom MFC after: 3 days
show more ...
|
| #
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 ...
|
| #
d2536a25
|
| 19-Jan-2021 |
Bryan Venteicher <bryanv@FreeBSD.org> |
virtio_random: Add modern (V1) support
Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27899
|
| #
a1da7a46
|
| 06-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 ...
|
| #
9b31a8da
|
| 30-Dec-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Drop no longer needed unload kludge
After r356194, source deregistration no longer races with concurrent use.
Reviewed by: bryanv, markm Differential Revision: https://reviews.fre
virtio_random(4): Drop no longer needed unload kludge
After r356194, source deregistration no longer races with concurrent use.
Reviewed by: bryanv, markm Differential Revision: https://reviews.freebsd.org/D22490
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 ...
|
| #
ad5979f7
|
| 04-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Fix random(4) integration
random(4) masks unregistered entropy sources. Prior to this revision, virtio_random(4) did not correctly register a random_source and did not function as
virtio_random(4): Fix random(4) integration
random(4) masks unregistered entropy sources. Prior to this revision, virtio_random(4) did not correctly register a random_source and did not function as a source of entropy.
Random source registration for loadable pure sources requires registering a poll callback, which is invoked periodically by random(4)'s harvestq kthread. The periodic poll makes virtio_random(4)'s periodic entropy collection redundant, so this revision removes the callout.
The current random source API is somewhat limiting, so simply fail to attach any virtio_random devices if one is already registered as a source. This scenario is expected to be uncommon.
While here, handle the possibility of short reads from the hypervisor random device gracefully / correctly. It is not clear why a hypervisor would return a short read or if it is allowed by spec, but we may as well handle it.
Reviewed by: bryanv (earlier version), markm Security: yes (note: many other "pure" random sources remain broken) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20419
show more ...
|
| #
5ca5dfe9
|
| 01-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
random(4): Fix RANDOM_LOADABLE build
I introduced an obvious compiler error in r346282, so this change fixes that.
Unfortunately, RANDOM_LOADABLE isn't covered by our existing tinderbox, and it see
random(4): Fix RANDOM_LOADABLE build
I introduced an obvious compiler error in r346282, so this change fixes that.
Unfortunately, RANDOM_LOADABLE isn't covered by our existing tinderbox, and it seems like there were existing latent linking problems. I believe these were introduced on accident in r338324 during reduction of the boolean expression(s) adjacent to randomdev.c and hash.c. It seems the RANDOM_LOADABLE build breakage has gone unnoticed for nine months.
This change correctly annotates randomdev.c and hash.c with !random_loadable to match the pre-r338324 logic; and additionally updates the HWRNG drivers in MD 'files.*', which depend on random_device symbols, with !random_loadable (it is invalid for the kernel to depend on symbols from a module).
(The expression for both randomdev.c and hash.c was the same, prior to r338324: "optional random random_yarrow | random !random_yarrow !random_loadable". I.e., "random && (yarrow || !loadable)." When Yarrow was removed ("yarrow := False"), the expression was incorrectly reduced to "optional random" when it should have retained "random && !loadable".)
Additionally, I discovered that virtio_random was missing a MODULE_DEPEND on random_device, which breaks kld load/link of the driver on RANDOM_LOADABLE kernels. Address that issue as well.
PR: 238223 Reported by: Eir Nym <eirnym AT gmail.com> Reviewed by: delphij, markm Approved by: secteam(delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20466
show more ...
|
| #
af8f74ad
|
| 27-May-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Remove unneeded reference to device
The device_t always references the softc, so we can pass the device and obtain the softc instead of the other way around.
|
| #
da2d1e9d
|
| 29-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338298 through r338391.
|
| #
d5f55356
|
| 19-Aug-2025 |
Mark Johnston <markj@FreeBSD.org> |
random: Make random_source definitions const
We can do so trivially, so make these tables read-only. No functional change intended.
Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: Storms
random: Make random_source definitions const
We can do so trivially, so make these tables read-only. No functional change intended.
Reviewed by: cem, emaste MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52003
show more ...
|
| #
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 ...
|
| #
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 ...
|
| #
f1c5a2e3
|
| 05-Sep-2023 |
John-Mark Gurney <jmg@FreeBSD.org> |
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been returned from an previous fetch during read, just return EAGAIN rather than blocking.
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41656
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 ...
|