[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen stable-4.13] memory: Align MemoryRegionSections fields

commit c0aca9352d51c102c55fe29ce5c1bf8e74a5183e
Author:     Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx>
AuthorDate: Wed Aug 14 18:55:33 2019 +0100
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Tue Nov 12 16:23:49 2019 -0600

    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@xxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
    Message-Id: <20190814175535.2023-2-dgilbert@xxxxxxxxxx>
    Reviewed-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    (cherry picked from commit 44f85d3276397cfa2cfa379c61430405dad4e644)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
 include/exec/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/exec/memory.h b/include/exec/memory.h
index bb0961ddb9..e28d79cc59 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -487,10 +487,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;
generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.13



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.