aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-03-10 18:32:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-13 17:35:25 -0400
commite485ceac9ebd43901ef0ce13622385d509e072e7 (patch)
tree74ba59bdaea967ab3dcc53fabd5dc163b2f2411c /include/linux/hyperv.h
parent04bf30115f4ba2beda1efb6cfbae49cdc757f3a9 (diff)
Drivers: hv: Add new message types to enhance KVP
Add additional KVP (Key Value Pair) protocol messages to enhance KVP functionality for Linux guests on Hyper-V. As part of this, patch define an explicit version negoitiation message. Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index e57a6c6ee0e8..a2d8c547f91b 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -149,7 +149,11 @@ struct hv_kvp_exchg_msg_value {
149 __u32 key_size; 149 __u32 key_size;
150 __u32 value_size; 150 __u32 value_size;
151 __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; 151 __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
152 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; 152 union {
153 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
154 __u32 value_u32;
155 __u64 value_u64;
156 };
153} __attribute__((packed)); 157} __attribute__((packed));
154 158
155struct hv_kvp_msg_enumerate { 159struct hv_kvp_msg_enumerate {
@@ -157,11 +161,31 @@ struct hv_kvp_msg_enumerate {
157 struct hv_kvp_exchg_msg_value data; 161 struct hv_kvp_exchg_msg_value data;
158} __attribute__((packed)); 162} __attribute__((packed));
159 163
164struct hv_kvp_msg_get {
165 struct hv_kvp_exchg_msg_value data;
166};
167
168struct hv_kvp_msg_set {
169 struct hv_kvp_exchg_msg_value data;
170};
171
172struct hv_kvp_msg_delete {
173 __u32 key_size;
174 __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
175};
176
177struct hv_kvp_register {
178 __u8 version[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
179};
180
160struct hv_kvp_msg { 181struct hv_kvp_msg {
161 struct hv_kvp_hdr kvp_hdr; 182 struct hv_kvp_hdr kvp_hdr;
162 union { 183 union {
163 struct hv_kvp_msg_enumerate kvp_enum_data; 184 struct hv_kvp_msg_get kvp_get;
164 char kvp_version[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; 185 struct hv_kvp_msg_set kvp_set;
186 struct hv_kvp_msg_delete kvp_delete;
187 struct hv_kvp_msg_enumerate kvp_enum_data;
188 struct hv_kvp_register kvp_register;
165 } body; 189 } body;
166} __attribute__((packed)); 190} __attribute__((packed));
167 191