summaryrefslogtreecommitdiffstats
path: root/include/exec/memory.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2019-08-14 19:55:33 +0200
committerMichael S. Tsirkin2019-09-25 16:15:59 +0200
commit44f85d3276397cfa2cfa379c61430405dad4e644 (patch)
treec6becbd0f6542b0f4ead53b32ab481ec9f63ca58 /include/exec/memory.h
parentMerge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190924' into st... (diff)
downloadqemu-44f85d3276397cfa2cfa379c61430405dad4e644.tar.gz
qemu-44f85d3276397cfa2cfa379c61430405dad4e644.tar.xz
qemu-44f85d3276397cfa2cfa379c61430405dad4e644.zip
memory: Align MemoryRegionSections fields
MemoryRegionSection includes an Int128 'size' field; on some platforms the compiler causes an alignment of this to a 128bit boundary, leaving 8 bytes of dead space. This deadspace can be filled with junk. Move the size field to the top avoiding unnecessary alignment. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190814175535.2023-2-dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec/memory.h')
-rw-r--r--include/exec/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index a30245c25a..a1e6d846cc 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -495,10 +495,10 @@ static inline FlatView *address_space_to_flatview(AddressSpace *as)
* @nonvolatile: this section is non-volatile
*/
struct MemoryRegionSection {
+ Int128 size;
MemoryRegion *mr;
FlatView *fv;
hwaddr offset_within_region;
- Int128 size;
hwaddr offset_within_address_space;
bool readonly;
bool nonvolatile;