From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Eddie Dong <eddie.dong@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 1/5] xen/misc: Functional cleanup for __attribute__((packed)) changes
Date: Thu, 13 Mar 2014 15:04:16 +0000 [thread overview]
Message-ID: <1394723060-24158-2-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1394723060-24158-1-git-send-email-andrew.cooper3@citrix.com>
This is to separate the functional changes from the noop consistency changes.
* Pack struct cper_mce_record rather than creating a structure named __packed
* Remove unreferenced struct xgt_desc
* Use two u16's rather than two u32 16-bit bitfields
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Jun Nakajima <jun.nakajima@intel.com>
CC: Eddie Dong <eddie.dong@intel.com>
---
xen/arch/x86/cpu/mcheck/mce-apei.c | 2 +-
xen/arch/x86/hvm/vmx/vmcs.c | 5 -----
xen/common/trace.c | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/cpu/mcheck/mce-apei.c b/xen/arch/x86/cpu/mcheck/mce-apei.c
index 3370341..f9168b0 100644
--- a/xen/arch/x86/cpu/mcheck/mce-apei.c
+++ b/xen/arch/x86/cpu/mcheck/mce-apei.c
@@ -53,7 +53,7 @@ struct cper_mce_record {
struct cper_record_header hdr;
struct cper_section_descriptor sec_hdr;
struct mce mce;
-} __packed;
+} __attribute__((packed));
/* Reset to default packing */
#pragma pack()
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 9ffb4af..4b886e5 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -670,11 +670,6 @@ void vmx_vmcs_exit(struct vcpu *v)
}
}
-struct xgt_desc {
- unsigned short size;
- unsigned long address __attribute__((packed));
-};
-
static void vmx_set_host_env(struct vcpu *v)
{
unsigned int cpu = smp_processor_id();
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 41ddc33..73ba57c 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -643,7 +643,7 @@ static inline void insert_lost_records(struct t_buf *buf)
{
struct {
u32 lost_records;
- u32 did:16, vid:16;
+ u16 did, vid;
u64 first_tsc;
} __attribute__((packed)) ed;
--
1.7.10.4
next prev parent reply other threads:[~2014-03-13 15:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 15:04 [PATCH v2 0/5] Improvements to the use of __attribute__((packed)) Andrew Cooper
2014-03-13 15:04 ` Andrew Cooper [this message]
2014-03-13 16:22 ` [PATCH v2 1/5] xen/misc: Functional cleanup for __attribute__((packed)) changes Jan Beulich
2014-03-13 16:30 ` Andrew Cooper
2014-03-13 15:04 ` [PATCH v2 2/5] xen/common: Shuffle use of __attribute__((packed)) Andrew Cooper
2014-03-13 15:04 ` [PATCH v2 3/5] xen/x86: " Andrew Cooper
2014-03-13 15:04 ` [PATCH v2 4/5] xen/arm: " Andrew Cooper
2014-03-13 15:04 ` [PATCH v2 5/5] xen/x86_emulate: " Andrew Cooper
2014-03-13 16:08 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394723060-24158-2-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).