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

[Xen-devel] [PATCH] fix unaligned access in blktap



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 <kouya@xxxxxxxxxxxxxx>

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;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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