History

vfio: Add explicit alignments in vfio_iommu_spapr_tce_create

The vfio_iommu_spapr_tce_create struct has 4x32bit and 2x64bit fields which should have resulted in sizeof(fio_iommu_spapr_tce_create) equal to 32 bytes. However due to the gcc's default alignment, the actual size of this struct is 40 bytes. This fills gaps with __resv1/2 fields. This should not cause any change in behavior.

Alexey Kardashevskiy committed 10 years ago

Commit 77d6bd41 parent 96762881 file · +2 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/vfio.h+2−0
@@ -568,8 +568,10 @@ struct vfio_iommu_spapr_tce_create { · 567 unmodified lines
568 __u32 flags;568 __u32 flags;
569 /* in */569 /* in */
570 __u32 page_shift;570 __u32 page_shift;
571 __u32 __resv1;
571 __u64 window_size;572 __u64 window_size;
572 __u32 levels;573 __u32 levels;
574 __u32 __resv2;
573 /* out */575 /* out */
574 __u64 start_addr;576 __u64 start_addr;
575};577};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t