diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2014-10-24 06:20:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 13:21:44 -0500 |
commit | 31d4ea1a093fcf668d5f95af44b8d41488bdb7ec (patch) | |
tree | f27847b1ce9dc72f2cf418837a496e72e6e44727 /include/uapi | |
parent | 170f4bea2008054e5098f99359e29823a7b4b1b9 (diff) |
Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host messages
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/hyperv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index 0a8e6badb29b..bb1cb73c927a 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h | |||
@@ -134,6 +134,7 @@ struct hv_start_fcopy { | |||
134 | 134 | ||
135 | struct hv_do_fcopy { | 135 | struct hv_do_fcopy { |
136 | struct hv_fcopy_hdr hdr; | 136 | struct hv_fcopy_hdr hdr; |
137 | __u32 pad; | ||
137 | __u64 offset; | 138 | __u64 offset; |
138 | __u32 size; | 139 | __u32 size; |
139 | __u8 data[DATA_FRAGMENT]; | 140 | __u8 data[DATA_FRAGMENT]; |