1 /* 2 * Virtio PCI driver 3 * 4 * This module allows virtio devices to be used over a virtual PCI device. 5 * This can be used with QEMU based VMMs like KVM or Xen. 6 * 7 * Copyright IBM Corp. 2007 8 * 9 * Authors: 10 * Anthony Liguori <aliguori@us.ibm.com> 11 * 12 * This work is licensed under the terms of the GNU GPL, version 2 or later. 13 * See the COPYING file in the top-level directory. 14 * 15 */ 16 17 #ifndef _LINUX_VIRTIO_PCI_H 18 #define _LINUX_VIRTIO_PCI_H 19 20 #include <linux/virtio_config.h> 21 22 /* A 32-bit r/o bitmask of the features supported by the host */ 23 #define VIRTIO_PCI_HOST_FEATURES 0 24 25 /* A 32-bit r/w bitmask of features activated by the guest */ 26 #define VIRTIO_PCI_GUEST_FEATURES 4 27 28 /* A 32-bit r/w PFN for the currently selected queue */ 29 #define VIRTIO_PCI_QUEUE_PFN 8 30 31 /* A 16-bit r/o queue size for the currently selected queue */ 32 #define VIRTIO_PCI_QUEUE_NUM 12 33 34 /* A 16-bit r/w queue selector */ 35 #define VIRTIO_PCI_QUEUE_SEL 14 36 37 /* A 16-bit r/w queue notifier */ 38 #define VIRTIO_PCI_QUEUE_NOTIFY 16 39 40 /* An 8-bit device status register. */ 41 #define VIRTIO_PCI_STATUS 18 42 43 /* An 8-bit r/o interrupt status register. Reading the value will return the 44 * current contents of the ISR and will also clear it. This is effectively 45 * a read-and-acknowledge. */ 46 #define VIRTIO_PCI_ISR 19 47 48 /* The bit of the ISR which indicates a device configuration change. */ 49 #define VIRTIO_PCI_ISR_CONFIG 0x2 50 51 /* The remaining space is defined by each driver as the per-driver 52 * configuration space */ 53 #define VIRTIO_PCI_CONFIG 20 54 55 /* Virtio ABI version, this must match exactly */ 56 #define VIRTIO_PCI_ABI_VERSION 0 57 #endif 58