The current version of the configuration structure has unaligned 16-bit fields, but according to the specification [1], access to the configuration space must be aligned. Add a second, aligned version of the configuration structure and a new feature bit indicating that this version is being used. [1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.pdf
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -9,6 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | #define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */ |
| 10 | 10 | #define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */ |
| 11 | 11 | #define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */ |
| 12 | +#define VIRTIO_BT_F_CONFIG_V2 3 /* Use second version configuration */ | |
| 12 | 13 | |
| 13 | 14 | enum virtio_bt_config_type { |
| 14 | 15 | VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0, |
| @@ -28,4 +29,11 @@ struct virtio_bt_config { · 13 unmodified lines | ||
| 28 | 29 | __u16 msft_opcode; |
| 29 | 30 | } __attribute__((packed)); |
| 30 | 31 | |
| 32 | +struct virtio_bt_config_v2 { | |
| 33 | + __u8 type; | |
| 34 | + __u8 alignment; | |
| 35 | + __u16 vendor; | |
| 36 | + __u16 msft_opcode; | |
| 37 | +}; | |
| 38 | + | |
| 31 | 39 | #endif /* _UAPI_LINUX_VIRTIO_BT_H */ |