Commit 92792ac752aa ("virtio-pci: Introduce admin command sending function") added "__packed" structures to UAPI header linux/virtio_pci.h. This triggers build failures in the consumer userspace applications without proper "definition" of __packed (e.g., kvmtool build fails). Moreover, the structures are already packed well, and doesn't need explicit packing, similar to the rest of the structures in all virtio_* headers. Remove the __packed attribute.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -240,7 +240,7 @@ struct virtio_pci_cfg_cap { · 239 unmodified lines | ||
| 240 | 240 | #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_READ 0x5 |
| 241 | 241 | #define VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO 0x6 |
| 242 | 242 | |
| 243 | −struct __packed virtio_admin_cmd_hdr { | |
| 243 | +struct virtio_admin_cmd_hdr { | |
| 244 | 244 | __le16 opcode; |
| 245 | 245 | /* |
| 246 | 246 | * 1 - SR-IOV |
| @@ -252,20 +252,20 @@ struct __packed virtio_admin_cmd_hdr { · 5 unmodified lines | ||
| 252 | 252 | __le64 group_member_id; |
| 253 | 253 | }; |
| 254 | 254 | |
| 255 | −struct __packed virtio_admin_cmd_status { | |
| 255 | +struct virtio_admin_cmd_status { | |
| 256 | 256 | __le16 status; |
| 257 | 257 | __le16 status_qualifier; |
| 258 | 258 | /* Unused, reserved for future extensions. */ |
| 259 | 259 | __u8 reserved2[4]; |
| 260 | 260 | }; |
| 261 | 261 | |
| 262 | −struct __packed virtio_admin_cmd_legacy_wr_data { | |
| 262 | +struct virtio_admin_cmd_legacy_wr_data { | |
| 263 | 263 | __u8 offset; /* Starting offset of the register(s) to write. */ |
| 264 | 264 | __u8 reserved[7]; |
| 265 | 265 | __u8 registers[]; |
| 266 | 266 | }; |
| 267 | 267 | |
| 268 | −struct __packed virtio_admin_cmd_legacy_rd_data { | |
| 268 | +struct virtio_admin_cmd_legacy_rd_data { | |
| 269 | 269 | __u8 offset; /* Starting offset of the register(s) to read. */ |
| 270 | 270 | }; |
| 271 | 271 | |
| @@ -275,7 +275,7 @@ struct __packed virtio_admin_cmd_legacy_rd_data { · 3 unmodified lines | ||
| 275 | 275 | |
| 276 | 276 | #define VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO 4 |
| 277 | 277 | |
| 278 | −struct __packed virtio_admin_cmd_notify_info_data { | |
| 278 | +struct virtio_admin_cmd_notify_info_data { | |
| 279 | 279 | __u8 flags; /* 0 = end of list, 1 = owner device, 2 = member device */ |
| 280 | 280 | __u8 bar; /* BAR of the member or the owner device */ |
| 281 | 281 | __u8 padding[6]; |