diff options
Diffstat (limited to 'include/uapi/linux/hyperv.h')
-rw-r--r-- | include/uapi/linux/hyperv.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index 1861f8e2ce2b..9beb7c991638 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #ifndef _UAPI_HYPERV_H | 25 | #ifndef _UAPI_HYPERV_H |
26 | #define _UAPI_HYPERV_H | 26 | #define _UAPI_HYPERV_H |
27 | 27 | ||
28 | #include <linux/uuid.h> | ||
29 | |||
28 | /* | 30 | /* |
29 | * Framework version for util services. | 31 | * Framework version for util services. |
30 | */ | 32 | */ |
@@ -94,6 +96,50 @@ struct hv_vss_msg { | |||
94 | } __attribute__((packed)); | 96 | } __attribute__((packed)); |
95 | 97 | ||
96 | /* | 98 | /* |
99 | * Implementation of a host to guest copy facility. | ||
100 | */ | ||
101 | |||
102 | #define FCOPY_VERSION_0 0 | ||
103 | #define FCOPY_CURRENT_VERSION FCOPY_VERSION_0 | ||
104 | #define W_MAX_PATH 260 | ||
105 | |||
106 | enum hv_fcopy_op { | ||
107 | START_FILE_COPY = 0, | ||
108 | WRITE_TO_FILE, | ||
109 | COMPLETE_FCOPY, | ||
110 | CANCEL_FCOPY, | ||
111 | }; | ||
112 | |||
113 | struct hv_fcopy_hdr { | ||
114 | __u32 operation; | ||
115 | uuid_le service_id0; /* currently unused */ | ||
116 | uuid_le service_id1; /* currently unused */ | ||
117 | } __attribute__((packed)); | ||
118 | |||
119 | #define OVER_WRITE 0x1 | ||
120 | #define CREATE_PATH 0x2 | ||
121 | |||
122 | struct hv_start_fcopy { | ||
123 | struct hv_fcopy_hdr hdr; | ||
124 | __u16 file_name[W_MAX_PATH]; | ||
125 | __u16 path_name[W_MAX_PATH]; | ||
126 | __u32 copy_flags; | ||
127 | __u64 file_size; | ||
128 | } __attribute__((packed)); | ||
129 | |||
130 | /* | ||
131 | * The file is chunked into fragments. | ||
132 | */ | ||
133 | #define DATA_FRAGMENT (6 * 1024) | ||
134 | |||
135 | struct hv_do_fcopy { | ||
136 | struct hv_fcopy_hdr hdr; | ||
137 | __u64 offset; | ||
138 | __u32 size; | ||
139 | __u8 data[DATA_FRAGMENT]; | ||
140 | }; | ||
141 | |||
142 | /* | ||
97 | * An implementation of HyperV key value pair (KVP) functionality for Linux. | 143 | * An implementation of HyperV key value pair (KVP) functionality for Linux. |
98 | * | 144 | * |
99 | * | 145 | * |