include/uapi/linux/virtio_console.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/virtio_console.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/virtio_console.h
Extension
.h
Size
3172 bytes
Lines
79
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct virtio_console_config {
	/* columns of the screens */
	__virtio16 cols;
	/* rows of the screens */
	__virtio16 rows;
	/* max. number of ports this device can hold */
	__virtio32 max_nr_ports;
	/* emergency write register */
	__virtio32 emerg_wr;
} __attribute__((packed));

/*
 * A message that's passed between the Host and the Guest for a
 * particular port.
 */
struct virtio_console_control {
	__virtio32 id;		/* Port number */
	__virtio16 event;	/* The kind of control event (see below) */
	__virtio16 value;	/* Extra information for the key */
};

/* Some events for control messages */
#define VIRTIO_CONSOLE_DEVICE_READY	0
#define VIRTIO_CONSOLE_PORT_ADD		1
#define VIRTIO_CONSOLE_PORT_REMOVE	2
#define VIRTIO_CONSOLE_PORT_READY	3
#define VIRTIO_CONSOLE_CONSOLE_PORT	4
#define VIRTIO_CONSOLE_RESIZE		5
#define VIRTIO_CONSOLE_PORT_OPEN	6
#define VIRTIO_CONSOLE_PORT_NAME	7


#endif /* _UAPI_LINUX_VIRTIO_CONSOLE_H */

Annotation

Implementation Notes