virtio_con.h
This interface provides the ability to initalise a VMM virtio console driver. This creating a virtio PCI device in the VM's virtual pci. This can subsequently be accessed through ‘/dev/hvc0’ in the guest.
Functions:
Structs:
The interface virtio_con.h
defines the following functions.
common_make_virtio_con(vm, pci, ioport, ioport_range, port_type, interrupt_pin, interrupt_lin, backend)
Initialise a new virtio_con device with Base Address Registers (BARs) starting at iobase and backend functions specified by the console_passthrough struct. virtio_con_default_backend for default methods.
Parameters:
vm {vm_t *}
: Handle to the VMpci {vmm_pci_space_t *}
: PCI library instance to register virtio con deviceioport {vmm_io_port_list_t *}
: IOPort library instance to register virtio con ioportioport_range {ioport_range_t}
: BAR port for front end emulationiotype {ioport_type_t}
: Type of ioport i.e. whether to alloc or use given rangeinterrupt_pin {unsigned int}
: PCI interrupt pin e.g. INTA = 1, INTB = 2 ,...interrupt_line {unsigned int}
: PCI interrupt line for virtio con IRQSbackend {struct console_passthrough}
: Function pointers to backend implementation. Can be initialised byReturns:
Back to interface description.
The interface virtio_con.h
defines the following structs.
virtio_con
Virtio Console Driver Interface
Elements:
iobase {unsigned int}
: IO Port base for virtio con deviceemul {virtio_emul_t *}
: Virtio console emulation interface: VMM <-> Guestemul_driver_funcs {struct console_passthrough}
: Virtio console emulation functions: VMM <-> Guestioops {ps_io_ops_t}
: Platform support io ops datastructureBack to interface description.
Back to top.