Add support for sending admin command through admin virtqueue interface. Abort any inflight admin commands once device reset completes. Activate admin queue when device becomes ready; deactivate on device reset. To comply to the below specification statement [1], the admin virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -223,4 +223,26 @@ struct virtio_pci_cfg_cap { · 222 unmodified lines | |||
| 223 | 223 | ||
| 224 | #endif /* VIRTIO_PCI_NO_MODERN */ | 224 | #endif /* VIRTIO_PCI_NO_MODERN */ |
| 225 | 225 | ||
| 226 | /* Admin command status. */ | ||
| 227 | #define VIRTIO_ADMIN_STATUS_OK 0 | ||
| 228 | |||
| 229 | struct __packed virtio_admin_cmd_hdr { | ||
| 230 | __le16 opcode; | ||
| 231 | /* | ||
| 232 | * 1 - SR-IOV | ||
| 233 | * 2-65535 - reserved | ||
| 234 | */ | ||
| 235 | __le16 group_type; | ||
| 236 | /* Unused, reserved for future extensions. */ | ||
| 237 | __u8 reserved1[12]; | ||
| 238 | __le64 group_member_id; | ||
| 239 | }; | ||
| 240 | |||
| 241 | struct __packed virtio_admin_cmd_status { | ||
| 242 | __le16 status; | ||
| 243 | __le16 status_qualifier; | ||
| 244 | /* Unused, reserved for future extensions. */ | ||
| 245 | __u8 reserved2[4]; | ||
| 246 | }; | ||
| 247 | |||
| 226 | #endif | 248 | #endif |