History log of /freebsd-current/sys/dev/virtio/pci/virtio_pci.h
Revision Date Author Comments
# 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 by: The FreeBSD Foundation

Reviewers: bryanv

Reviewed By: bryanv

Subscribers: cognet, imp

Differential Revision: https://reviews.freebsd.org/D41850


# ccb576a8 18-Sep-2023 Mina Galić <freebsd@igalic.co>

virtio: use bool for boolean functions

Summary:
these static functions:
- vq_ring_use_indirect

and these public functions:
- virtio_bus_is_modern
- virtio_with_feature
- virtqueue_empty
- virtqueue_full

exclusively return a boolean value.
Change their return values to bool.

Sponsored by: The FreeBSD Foundation

Reviewers: bryanv

Reviewed By: bryanv

Subscribers: cognet, imp

Differential Revision: https://reviews.freebsd.org/D41848


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\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 BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 703f17d6 18-Jan-2021 Bryan Venteicher <bryanv@FreeBSD.org>

virtio_pci: Add sysctl to show current features

Reviewed by: grehan (mentor)
Differential Revision: https://reviews.freebsd.org/D27898


# 9da9560c 18-Jan-2021 Bryan Venteicher <bryanv@FreeBSD.org>

virtio: Add VirtIO PCI modern (V1) support

Use the existing legacy PCI driver as the basis for shared code
between the legacy and modern PCI drivers. The existing virtio_pci
kernel module will contain both the legacy and modern drivers.

Changes to the virtqueue and each device driver (network, block, etc)
for V1 support come in later commits.

Update the MMIO driver to reflect the VirtIO bus method changes, but
the modern compliance can be improved on later.

Note that the modern PCI driver requires bus_map_resource() to be
implemented, which is not the case on all archs.

The hw.virtio.pci.transitional tunable default value is zero so
transitional devices will continue to be driven via the legacy
driver.

Reviewed by: grehan (mentor)
Differential Revision: https://reviews.freebsd.org/D27856


# 7282444b 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# e026de11 15-Jun-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Remove kernel specific macro out of the VirtIO PCI header file

The eventual goal is to share this file with userland, so
remove the macro that is only specific for virtio_pci(4).
Instead, add the VIRTIO_PCI_CONFIG_OFF macro from Linux to
get the config size whether MSIX is enabled or not.

MFC after: 1 week


# 310dacd0 10-Jul-2012 Peter Grehan <grehan@FreeBSD.org>

Various VirtIO improvements

PCI:
- Properly handle interrupt fallback from MSIX to MSI to legacy.
The host may not have sufficient resources to support MSIX,
so we must be able to fallback to legacy interrupts.
- Add interface to get the (sub) vendor and device IDs.
- Rename flags to VTPCI_FLAG_* like other VirtIO drivers.
Block:
- No longer allocate vtblk_requests from separate UMA zone.
malloc(9) from M_DEVBUF is sufficient. Assert segment counts
at allocation.
- More verbose error and debug messages.
Network:
- Remove stray write once variable.
Virtqueue:
- Shuffle code around in preparation of converting the mb()s to
the appropriate atomic(9) operations.
- Only walk the descriptor chain when freeing if INVARIANTS is
defined since the result is only KASSERT()ed.

Submitted by: Bryan Venteicher (bryanv@daemoninthecloset.org)


# 336f459c 05-Dec-2011 Peter Grehan <grehan@FreeBSD.org>

Catch up with Bryan Venteicher's virtio Hg repo:

c162516
Remove vtblk_sector_size

c162515
Wrap long license lines

c162514
Remove vtblk_unit

c162513
Wrap long lines in the license.

c162512
Remove verbose messages when link goes up/down.

A similar message is printed elsewhere as a result of
if_link_state_change().

c162511
Explicity compare pointer to NULL

c162510
Allocate the mac filter table at attach time.

c162509
Add real BSD licenses to the header files copied from Linux.

The chases upstream changes made in Linux awhile ago.

c162508
Only notify if we actually dequeued something.

c162507
Change a couple of if () { KASSERT(...) } to just KASSERTs.

In non-debug kernels, the if() { } probably get optomized
away, but I guess this is clearer.

c162506
Remove VIRTIO_BLK_F_TOPOLOGY fields in the config.

TOPOLOGY has since been removed from the spec, and the FreeBSD
didn't really do anything with the fields anyways.

c162505
Move vtblk_enqueue_request() outside the locks when getting the ident.

c162504
Remove soon to be uneeded trylock during dump [1].
http://lists.freebsd.org/pipermail/freebsd-current/2011-November/029226.html

c162503
Remove emtpy line

c162502
Drop frame if cannot allocate a vtnet_tx_header.

If we don't, we set OACTIVE, but if there are no
other frames in flight, vtnet_txeof() will never
be called to unset OACTIVE. The interface would
have to be down/up'ed in order to become usable.

We could be cuter here and only do this if the
virtqueue is emtpy, but its probably not worth
the complication.

c162501
Start mbuf replacement loop at 1 for clarity

Obtained from: Bryan Venteicher bryanv at daemoninthecloset dot org


# 10b59a9b 17-Nov-2011 Peter Grehan <grehan@FreeBSD.org>

Import virtio base, PCI front-end, and net/block/balloon drivers.
Tested on Qemu/KVM, VirtualBox, and BHyVe.

Currently built as modules-only on i386/amd64. Man pages not yet hooked
up, pending review.

Submitted by: Bryan Venteicher bryanv at daemoninthecloset dot org
Reviewed by: bz
MFC after: 4 weeks or so