virtio_drivers/device/
common.rs

1//! Common part shared across all the devices.
2
3use bitflags::bitflags;
4
5bitflags! {
6    #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
7    pub(crate) struct Feature: u64 {
8        // device independent
9        const NOTIFY_ON_EMPTY       = 1 << 24; // legacy
10        const ANY_LAYOUT            = 1 << 27; // legacy
11        const RING_INDIRECT_DESC    = 1 << 28;
12        const RING_EVENT_IDX        = 1 << 29;
13        const UNUSED                = 1 << 30; // legacy
14        const VERSION_1             = 1 << 32; // detect legacy
15
16        // since virtio v1.1
17        const ACCESS_PLATFORM       = 1 << 33;
18        const RING_PACKED           = 1 << 34;
19        const IN_ORDER              = 1 << 35;
20        const ORDER_PLATFORM        = 1 << 36;
21        const SR_IOV                = 1 << 37;
22        const NOTIFICATION_DATA     = 1 << 38;
23    }
24}