From: Kouya Shimura Subject: [PATCH] fix unaligned access in blktap Date: Wed, 1 Aug 2007 13:44:11 +0900 Message-ID: <7k3az3euec.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hXyWf2Brq4" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --hXyWf2Brq4 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Hi, Using a tapdisk on IA64 outputs the following messages. tapdisk(8027): unaligned access to 0x600000000000c01a, ip=0x40000000000130c0 tapdisk(8027): unaligned access to 0x600000000000c022, ip=0x40000000000130d1 blktapctrl(4036): unaligned access to 0x6000000000008eca, ip=0x40000000000028a0 blktapctrl(4036): unaligned access to 0x6000000000008ed2, ip=0x40000000000028a1 This patch fixes it. In the struct msg_hdr, uint8_t seems to be enough for type and drivertype though... Thanks, Kouya Signed-off-by: Kouya Shimura --hXyWf2Brq4 Content-Type: text/plain Content-Disposition: inline; filename="blktap_align.patch" Content-Transfer-Encoding: 7bit diff -r d69a57b29e3f tools/blktap/lib/blktaplib.h --- a/tools/blktap/lib/blktaplib.h Mon Jul 30 18:14:29 2007 -0600 +++ b/tools/blktap/lib/blktaplib.h Wed Aug 01 12:58:40 2007 +0900 @@ -175,7 +175,7 @@ typedef struct msg_hdr { uint16_t drivertype; uint16_t cookie; uint8_t readonly; -} msg_hdr_t; +} __attribute__ ((aligned(sizeof(unsigned long long)))) msg_hdr_t; typedef struct msg_newdev { uint8_t devnum; --hXyWf2Brq4 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --hXyWf2Brq4--