virtio_config.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _LINUX_VIRTIO_CONFIG_H
  2. #define _LINUX_VIRTIO_CONFIG_H
  3. /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
  4. * anyone can use the definitions to implement compatible drivers/servers. */
  5. /* Virtio devices use a standardized configuration space to define their
  6. * features and pass configuration information, but each implementation can
  7. * store and access that space differently. */
  8. #include <linux/types.h>
  9. /* Status byte for guest to report progress, and synchronize features. */
  10. /* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */
  11. #define VIRTIO_CONFIG_S_ACKNOWLEDGE 1
  12. /* We have found a driver for the device. */
  13. #define VIRTIO_CONFIG_S_DRIVER 2
  14. /* Driver has used its parts of the config, and is happy */
  15. #define VIRTIO_CONFIG_S_DRIVER_OK 4
  16. /* We've given up on this device. */
  17. #define VIRTIO_CONFIG_S_FAILED 0x80
  18. /* Some virtio feature bits (currently bits 28 through 31) are reserved for the
  19. * transport being used (eg. virtio_ring), the rest are per-device feature
  20. * bits. */
  21. #define VIRTIO_TRANSPORT_F_START 28
  22. #define VIRTIO_TRANSPORT_F_END 32
  23. /* Do we get callbacks when the ring is completely used, even if we've
  24. * suppressed them? */
  25. #define VIRTIO_F_NOTIFY_ON_EMPTY 24
  26. #endif /* _LINUX_VIRTIO_CONFIG_H */