Commit ebcff9d
vduse: avoid adding implicit padding
The vduse_iova_range_v2 and vduse_iotlb_entry_v2 structures are both
defined in a way that adds implicit padding and is incompatible between
i386 and x86_64 userspace because of the different structure alignment
requirements. Building the header with -Wpadded shows these new warnings:
vduse.h:305:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]
vduse.h:374:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]
Change the amount of padding in these two structures to align them to
64 bit words and avoid those problems. Since the v1 vduse_iotlb_entry
already has an inconsistent size, do not attempt to reuse the structure
but rather list the members indiviudally, with a fixed amount of
padding.
Fixes: 079212f ("vduse: add vq group asid support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260202224835.559538-1-arnd@kernel.org>1 parent 5145b27 commit ebcff9d
2 files changed
Lines changed: 21 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | | - | |
| 1315 | + | |
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
1321 | | - | |
| 1321 | + | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
| |||
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
| 1366 | + | |
| 1367 | + | |
1374 | 1368 | | |
1375 | 1369 | | |
1376 | 1370 | | |
| |||
1385 | 1379 | | |
1386 | 1380 | | |
1387 | 1381 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
| 1382 | + | |
1395 | 1383 | | |
1396 | 1384 | | |
1397 | 1385 | | |
1398 | 1386 | | |
1399 | 1387 | | |
1400 | | - | |
| 1388 | + | |
1401 | 1389 | | |
1402 | 1390 | | |
1403 | 1391 | | |
| |||
1603 | 1591 | | |
1604 | 1592 | | |
1605 | 1593 | | |
1606 | | - | |
1607 | | - | |
| 1594 | + | |
| 1595 | + | |
1608 | 1596 | | |
1609 | 1597 | | |
1610 | 1598 | | |
1611 | 1599 | | |
1612 | 1600 | | |
1613 | 1601 | | |
1614 | | - | |
1615 | | - | |
| 1602 | + | |
| 1603 | + | |
1616 | 1604 | | |
1617 | 1605 | | |
1618 | 1606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | | - | |
| 302 | + | |
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
| |||
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
| 372 | + | |
368 | 373 | | |
369 | 374 | | |
370 | 375 | | |
| |||
0 commit comments