History log of /freebsd-current/sys/dev/virtio/console/virtio_console.c
Revision Date Author Comments
# 018a361f 16-Jun-2024 Gordon Bergling <gbe@FreeBSD.org>

virtio(4): Fix two typos in KASSERT messages

- s/emtpy/empty/

MFC after: 5 days


# 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.

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


# 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


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 5c4c96d3 06-May-2022 John Baldwin <jhb@FreeBSD.org>

virtio: Remove unused devclass arguments to DRIVER_MODULE.


# 4d78ef3e 14-Dec-2021 Mateusz Guzik <mjg@FreeBSD.org>

virtio console: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")


# 633218ee 20-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 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


# e6cc42f1 18-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://reviews.freebsd.org/D27930


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

virtio_console: Add modern (V1) support

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


# 068dbf36 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

virtio: clean up empty lines in .c and .h files


# 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 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


# 0f6040f0 03-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; 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


# ac2fffa4 21-Jan-2018 Pedro F. Giffuni <pfg@FreeBSD.org>

Revert r327828, r327949, r327953, r328016-r328026, r328041:
Uses of mallocarray(9).

The use of mallocarray(9) has rocketed the required swap to build FreeBSD.
This is likely caused by the allocation size attributes which put extra pressure
on the compiler.

Given that most of these checks are superfluous we have to choose better
where to use mallocarray(9). We still have more uses of mallocarray(9) but
hopefully this is enough to bring swap usage to a reasonable level.

Reported by: wosch
PR: 225197


# 26c1d774 13-Jan-2018 Pedro F. Giffuni <pfg@FreeBSD.org>

dev: make some use of mallocarray(9).

Focus on code where we are doing multiplications within malloc(9). None of
these is likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.


# a019e26c 13-Jan-2018 Bryan Venteicher <bryanv@FreeBSD.org>

Fix possible panic when creating VirtIO console dev aliases

Since we have no control over the name, the MAKEDEV_CHECKNAME flag must be
used to return an error on an invalid (to devfs) name instead of panicing.

r305900 that originally added this feature also introduced a few other bugs:
- Proper locking not performed
- Theoretically broke the expectation that the control event buffer would
not span more than one pages, but did not update the CTASSERT that was
in place to prevent this. However, since the struct virtio_console_control
and the bulk buffer together were quite small, this could not have happened.

Also workaround an QEMU VirtIO spec violation in that it includes the NUL
terminator in the buffer length when the spec says it is not included.

PR: 223531
MFC after: 1 week


# 8be1b98c 24-Nov-2016 Andriy Gapon <avg@FreeBSD.org>

virtio_console: correctly determine presense of payload and its length

MFC after: 2 weeks


# f7b1d7f4 11-Nov-2016 Jakub Wojciech Klama <jceel@FreeBSD.org>

Reserve space for control message payload (currently a port name).

Approved by: trasz (mentor)
Sponsored by: iXsystems, Inc.


# cb981343 17-Sep-2016 Jakub Wojciech Klama <jceel@FreeBSD.org>

Create aliases for named virtio-console ports.

Make virtio_console(4) create `/dev/vtcon/<port_name>` alias pointing
to /dev/ttyVx.y upon receiving PORT_NAME (id = 7) event over the control
queue.

Approved by: trasz
MFC after: 1 month
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D7182


# 453130d9 02-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: minor spelling fixes.

Most affect comments, very few have user-visible effects.


# b84b3efd 06-Nov-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Several minor changes to hopefully complete the VirtIO console driver

- Support the KDB alt break sequence to enter the debugger,
panic, reboot, etc. [1]
- Provide emergency write feature description. Note that QEMU
does not implement this feature.
- Make the VTCON_FLAG_* defines sequential once again.
- When the multiple port feature is not negotiated, query the
rows and columns of the one console during the device attach
when the size feature is negotiated.
- Report failure to the device if hot plugging a port fails.
- Acknowledge the console port event with an open event. This
is required by the spec, but QEMU doesn't seem to care.

Submitted by: Juniper [1]
MFC after: 1 month


# 46822c48 03-Nov-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Create the tty device after the port is completely initialized

This fixes a race with a tty open before the host is the ready.

MFC after: 1 month


# 04434c94 03-Nov-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Add support for the multiport feature and fix hot plug races

MFC after: 1 month


# 6f744dde 22-Oct-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Add VirtIO console driver

Support for the multiport feature is mostly implemented, but currently
disabled due to some potential races in the hot plug code paths.

Requested by: marcel
MFC after: 1 month
Relnotes: yes