summaryrefslogtreecommitdiff
path: root/sys/dev/virtio/console
Commit message (Collapse)AuthorAgeFilesLines
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-6/+4
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=328218
* dev: make some use of mallocarray(9).Pedro F. Giffuni2018-01-131-4/+6
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=327949
* Fix possible panic when creating VirtIO console dev aliasesBryan Venteicher2018-01-131-23/+76
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=327948
* virtio_console: correctly determine presense of payload and its lengthAndriy Gapon2016-11-241-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=309116
* Reserve space for control message payload (currently a port name).Jakub Wojciech Klama2016-11-121-2/+3
| | | | | | | | Approved by: trasz (mentor) Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=308566
* Create aliases for named virtio-console ports.Jakub Wojciech Klama2016-09-171-6/+45
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=305900
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Several minor changes to hopefully complete the VirtIO console driverBryan Venteicher2014-11-071-16/+52
| | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=274215
* Create the tty device after the port is completely initializedBryan Venteicher2014-11-031-4/+4
| | | | | | | | | This fixes a race with a tty open before the host is the ready. MFC after: 1 month Notes: svn path=/head/; revision=274063
* Add support for the multiport feature and fix hot plug racesBryan Venteicher2014-11-031-350/+485
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=274055
* Add VirtIO console driverBryan Venteicher2014-10-232-0/+1313
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 Notes: svn path=/head/; revision=273515