xref: /kvmtool/include/kvm/virtio-pci-dev.h (revision b0d56e3c994a0feb3ffb519cecda5c1f6da8b1ab)
1 #ifndef VIRTIO_PCI_DEV_H_
2 #define VIRTIO_PCI_DEV_H_
3 
4 #include <linux/virtio_ids.h>
5 
6 /*
7  * Virtio PCI device constants and resources
8  * they do use (such as irqs and pins).
9  */
10 
11 #define PCI_DEVICE_ID_VIRTIO_NET		0x1000
12 #define PCI_DEVICE_ID_VIRTIO_BLK		0x1001
13 #define PCI_DEVICE_ID_VIRTIO_CONSOLE		0x1003
14 #define PCI_DEVICE_ID_VIRTIO_RNG		0x1004
15 #define PCI_DEVICE_ID_VIRTIO_BLN		0x1005
16 #define PCI_DEVICE_ID_VIRTIO_SCSI		0x1008
17 #define PCI_DEVICE_ID_VIRTIO_9P			0x1009
18 #define PCI_DEVICE_ID_VIRTIO_VSOCK		0x1012
19 #define PCI_DEVICE_ID_VESA			0x2000
20 #define PCI_DEVICE_ID_PCI_SHMEM			0x0001
21 
22 /* Modern virtio device IDs start at 1040 */
23 #define PCI_DEVICE_ID_VIRTIO_BASE		0x1040
24 #define PCI_SUBSYS_ID_VIRTIO_BASE		0x0040
25 
26 #define PCI_VENDOR_ID_REDHAT_QUMRANET		0x1af4
27 #define PCI_VENDOR_ID_PCI_SHMEM			0x0001
28 #define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET	0x1af4
29 
30 #define PCI_SUBSYSTEM_ID_VESA			0x0004
31 #define PCI_SUBSYSTEM_ID_PCI_SHMEM		0x0001
32 
33 #define PCI_CLASS_BLK				0x018000
34 #define PCI_CLASS_NET				0x020000
35 #define PCI_CLASS_CONSOLE			0x078000
36 /*
37  * 0xFF Device does not fit in any defined classes
38  */
39 #define PCI_CLASS_RNG				0xff0000
40 #define PCI_CLASS_BLN				0xff0000
41 #define PCI_CLASS_9P				0xff0000
42 #define PCI_CLASS_VSOCK				0xff0000
43 
44 #endif /* VIRTIO_PCI_DEV_H_ */
45