xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xenalyze: Make sure that the shadow information structs are packed
@ 2013-06-06 13:30 George Dunlap
  0 siblings, 0 replies; only message in thread
From: George Dunlap @ 2013-06-06 13:30 UTC (permalink / raw)
  To: xen-devel; +Cc: Simon Graham

# HG changeset patch
# User George Dunlap <george.dunlap@eu.citrix.com>
# 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@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-06 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06 13:30 [PATCH] xenalyze: Make sure that the shadow information structs are packed George Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).