summaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-02-02 16:56:50 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-09 08:32:44 -0800
commit2640335438ca4d7b139e114dae5f0d80e740e106 (patch)
tree0e254e2147dedefe04e385d0c97a9fbc15df2a23 /include/linux/hyperv.h
parenteab6af71f0b83a7f62b9c48be5b2c0a82a86fad3 (diff)
downloadlinux-2640335438ca4d7b139e114dae5f0d80e740e106.tar.gz
linux-2640335438ca4d7b139e114dae5f0d80e740e106.tar.bz2
linux-2640335438ca4d7b139e114dae5f0d80e740e106.zip
drivers: hv: kvp: Cleanup the kernel/user protocol
Now, cleanup the user/kernel KVP protocol by using the same structure definition that is used for host/guest KVP protocol. This simplifies the code. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@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, 5 insertions, 25 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index b822978ecbc8..75aee6720c1b 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -113,30 +113,6 @@
* (not supported), a NULL key string is returned.
*/
-/*
- *
- * The following definitions are shared with the user-mode component; do not
- * change any of this without making the corresponding changes in
- * the KVP user-mode component.
- */
-
-enum hv_ku_op {
- KVP_REGISTER = 0, /* Register the user mode component */
- KVP_KERNEL_GET, /* Kernel is requesting the value */
- KVP_KERNEL_SET, /* Kernel is providing the value */
- KVP_USER_GET, /* User is requesting the value */
- KVP_USER_SET /* User is providing the value */
-};
-
-struct hv_ku_msg {
- __u32 kvp_index; /* Key index */
- __u8 kvp_key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; /* Key name */
- __u8 kvp_value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; /* Key value */
-};
-
-
-
-
/*
* Registry value types.
@@ -149,6 +125,7 @@ enum hv_kvp_exchg_op {
KVP_OP_SET,
KVP_OP_DELETE,
KVP_OP_ENUMERATE,
+ KVP_OP_REGISTER,
KVP_OP_COUNT /* Number of operations, must be last. */
};
@@ -182,7 +159,10 @@ struct hv_kvp_msg_enumerate {
struct hv_kvp_msg {
struct hv_kvp_hdr kvp_hdr;
- struct hv_kvp_msg_enumerate kvp_data;
+ union {
+ struct hv_kvp_msg_enumerate kvp_enum_data;
+ char kvp_version[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
+ } body;
} __attribute__((packed));
#ifdef __KERNEL__