virtio_pci: add VIRTIO_PCI_NO_LEGACY
Add macro to disable all legacy register defines. Helpful to make sure legacy macros don't leak through into modern code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
#include <linux/virtio_config.h>
|
#include <linux/virtio_config.h>
|
||||||
|
|
||||||
|
#ifndef VIRTIO_PCI_NO_LEGACY
|
||||||
|
|
||||||
/* A 32-bit r/o bitmask of the features supported by the host */
|
/* A 32-bit r/o bitmask of the features supported by the host */
|
||||||
#define VIRTIO_PCI_HOST_FEATURES 0
|
#define VIRTIO_PCI_HOST_FEATURES 0
|
||||||
|
|
||||||
@ -67,16 +69,11 @@
|
|||||||
* a read-and-acknowledge. */
|
* a read-and-acknowledge. */
|
||||||
#define VIRTIO_PCI_ISR 19
|
#define VIRTIO_PCI_ISR 19
|
||||||
|
|
||||||
/* The bit of the ISR which indicates a device configuration change. */
|
|
||||||
#define VIRTIO_PCI_ISR_CONFIG 0x2
|
|
||||||
|
|
||||||
/* MSI-X registers: only enabled if MSI-X is enabled. */
|
/* MSI-X registers: only enabled if MSI-X is enabled. */
|
||||||
/* A 16-bit vector for configuration changes. */
|
/* A 16-bit vector for configuration changes. */
|
||||||
#define VIRTIO_MSI_CONFIG_VECTOR 20
|
#define VIRTIO_MSI_CONFIG_VECTOR 20
|
||||||
/* A 16-bit vector for selected queue notifications. */
|
/* A 16-bit vector for selected queue notifications. */
|
||||||
#define VIRTIO_MSI_QUEUE_VECTOR 22
|
#define VIRTIO_MSI_QUEUE_VECTOR 22
|
||||||
/* Vector value used to disable MSI for queue */
|
|
||||||
#define VIRTIO_MSI_NO_VECTOR 0xffff
|
|
||||||
|
|
||||||
/* The remaining space is defined by each driver as the per-driver
|
/* The remaining space is defined by each driver as the per-driver
|
||||||
* configuration space */
|
* configuration space */
|
||||||
@ -94,4 +91,12 @@
|
|||||||
/* The alignment to use between consumer and producer parts of vring.
|
/* The alignment to use between consumer and producer parts of vring.
|
||||||
* x86 pagesize again. */
|
* x86 pagesize again. */
|
||||||
#define VIRTIO_PCI_VRING_ALIGN 4096
|
#define VIRTIO_PCI_VRING_ALIGN 4096
|
||||||
|
|
||||||
|
#endif /* VIRTIO_PCI_NO_LEGACY */
|
||||||
|
|
||||||
|
/* The bit of the ISR which indicates a device configuration change. */
|
||||||
|
#define VIRTIO_PCI_ISR_CONFIG 0x2
|
||||||
|
/* Vector value used to disable MSI for queue */
|
||||||
|
#define VIRTIO_MSI_NO_VECTOR 0xffff
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user