Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/virtio.h
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define VIRTIO_VENDOR 0x1AF4 | #define VIRTIO_VENDOR 0x1AF4 | ||||
#define VIRTIO_DEV_NET 0x1000 | #define VIRTIO_DEV_NET 0x1000 | ||||
#define VIRTIO_DEV_BLOCK 0x1001 | #define VIRTIO_DEV_BLOCK 0x1001 | ||||
#define VIRTIO_DEV_CONSOLE 0x1003 | #define VIRTIO_DEV_CONSOLE 0x1003 | ||||
#define VIRTIO_DEV_RANDOM 0x1005 | #define VIRTIO_DEV_RANDOM 0x1005 | ||||
#define VIRTIO_DEV_SCSI 0x1008 | #define VIRTIO_DEV_SCSI 0x1008 | ||||
#define VIRTIO_DEV_9P 0x1009 | #define VIRTIO_DEV_9P 0x1009 | ||||
#define VIRTIO_DEV_INPUT 0x1052 | |||||
/* | |||||
* PCI revision IDs | |||||
*/ | |||||
#define VIRTIO_REV_INPUT 1 | |||||
/* | |||||
* PCI subvendor IDs | |||||
*/ | |||||
#define VIRTIO_SUBVEN_INPUT 0x108E | |||||
/* | |||||
* PCI subdevice IDs | |||||
*/ | |||||
#define VIRTIO_SUBDEV_INPUT 0x1100 | |||||
/* From section 2.3, "Virtqueue Configuration", of the virtio specification */ | /* From section 2.3, "Virtqueue Configuration", of the virtio specification */ | ||||
static inline int | static inline int | ||||
vring_size_aligned(u_int qsz) | vring_size_aligned(u_int qsz) | ||||
{ | { | ||||
return (roundup2(vring_size(qsz, VRING_ALIGN), VRING_ALIGN)); | return (roundup2(vring_size(qsz, VRING_ALIGN), VRING_ALIGN)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |