]> git.ipfire.org Git - people/ms/linux.git/commit
Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host messages
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 24 Oct 2014 10:20:27 +0000 (12:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2015 14:59:53 +0000 (06:59 -0800)
commitcb64628f01b74748c5f6a696dde7f8719a3aa6b6
treecf09a8060a14d248a8a6f41341e48fb374c39e18
parentae4b4f11a539399ee7b772ee6089b4c9af1ba228
Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host messages

commit 31d4ea1a093fcf668d5f95af44b8d41488bdb7ec upstream.

An attempt to fix fcopy on i586 (bc5a5b0 Drivers: hv: util: Properly pack the data
for file copy functionality) led to a regression on x86_64 (and actually didn't fix
i586 breakage). Fcopy messages from Hyper-V host come in the following format:

struct do_fcopy_hdr   |   36 bytes
0000                  |    4 bytes
offset                |    8 bytes
size                  |    4 bytes
data                  | 6144 bytes

On x86_64 struct hv_do_fcopy matched this format without ' __attribute__((packed))'
and on i586 adding ' __attribute__((packed))' to it doesn't change anything. Keep
the structure packed and add padding to match re reality. Tested both i586 and x86_64
on Hyper-V Server 2012 R2.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/hyperv.h