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

[Xen-devel] [PATCH] xenalyze: Make sure that the shadow information structs are packed



# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1370525135 -3600
# Node ID e9dc6fd0b1be1a3b1bc77efca93f71ec2deb2ea3
# Parent  71eeac989efca6a590051edc3dd132df1bd55f7b
xenalyze: Make sure that the shadow information structs are packed

As they are in the hypervisor code, just to make sure everything is
the same.

Spotted-by: Simon Graham <simon.graham@xxxxxxxxxx>
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff --git a/xenalyze.c b/xenalyze.c
--- a/xenalyze.c
+++ b/xenalyze.c
@@ -5618,17 +5618,17 @@ void shadow_emulate_process(struct recor
             unsigned gl1e, write_val;
             unsigned va;
             unsigned flags:29, emulation_count:3;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e, write_val;
             unsigned va;
             unsigned flags:29, emulation_count:3;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, write_val;
             unsigned long long va;
             unsigned flags:29, emulation_count:3;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
  
     union shadow_event sevt = { .event = ri->event };
@@ -5720,12 +5720,12 @@ void shadow_parse_other(struct record_in
            64-bit... :-/ */
         struct {
             unsigned int gfn, va;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
 #endif
         struct {
             unsigned long long gfn;
             unsigned int va;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gfn, va;
         } gpl4;
@@ -5924,15 +5924,15 @@ void shadow_fixup_process(struct record_
            so put it first for alignment sake. */
         struct {
             unsigned int gl1e, va, flags;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e;
             unsigned int va, flags;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, va;
             unsigned int flags;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
     union shadow_event sevt = { .event = ri->event };
     int rec_gpl = sevt.paging_levels + 2;
@@ -6112,15 +6112,15 @@ void shadow_propagate_process(struct rec
            so put it first for alignment sake. */
         struct {
             unsigned int gl1e, va, flags;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e;
             unsigned int va, flags;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, va;
             unsigned int flags;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
     union shadow_event sevt = { .event = ri->event };
     int rec_gpl = sevt.paging_levels + 2;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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