diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2012-02-02 19:56:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-09 11:32:44 -0500 |
commit | 2640335438ca4d7b139e114dae5f0d80e740e106 (patch) | |
tree | 0e254e2147dedefe04e385d0c97a9fbc15df2a23 /include/linux/hyperv.h | |
parent | eab6af71f0b83a7f62b9c48be5b2c0a82a86fad3 (diff) |
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.h | 30 |
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 @@ | |||
113 | * (not supported), a NULL key string is returned. | 113 | * (not supported), a NULL key string is returned. |
114 | */ | 114 | */ |
115 | 115 | ||
116 | /* | ||
117 | * | ||
118 | * The following definitions are shared with the user-mode component; do not | ||
119 | * change any of this without making the corresponding changes in | ||
120 | * the KVP user-mode component. | ||
121 | */ | ||
122 | |||
123 | enum hv_ku_op { | ||
124 | KVP_REGISTER = 0, /* Register the user mode component */ | ||
125 | KVP_KERNEL_GET, /* Kernel is requesting the value */ | ||
126 | KVP_KERNEL_SET, /* Kernel is providing the value */ | ||
127 | KVP_USER_GET, /* User is requesting the value */ | ||
128 | KVP_USER_SET /* User is providing the value */ | ||
129 | }; | ||
130 | |||
131 | struct hv_ku_msg { | ||
132 | __u32 kvp_index; /* Key index */ | ||
133 | __u8 kvp_key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; /* Key name */ | ||
134 | __u8 kvp_value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; /* Key value */ | ||
135 | }; | ||
136 | |||
137 | |||
138 | |||
139 | |||
140 | 116 | ||
141 | /* | 117 | /* |
142 | * Registry value types. | 118 | * Registry value types. |
@@ -149,6 +125,7 @@ enum hv_kvp_exchg_op { | |||
149 | KVP_OP_SET, | 125 | KVP_OP_SET, |
150 | KVP_OP_DELETE, | 126 | KVP_OP_DELETE, |
151 | KVP_OP_ENUMERATE, | 127 | KVP_OP_ENUMERATE, |
128 | KVP_OP_REGISTER, | ||
152 | KVP_OP_COUNT /* Number of operations, must be last. */ | 129 | KVP_OP_COUNT /* Number of operations, must be last. */ |
153 | }; | 130 | }; |
154 | 131 | ||
@@ -182,7 +159,10 @@ struct hv_kvp_msg_enumerate { | |||
182 | 159 | ||
183 | struct hv_kvp_msg { | 160 | struct hv_kvp_msg { |
184 | struct hv_kvp_hdr kvp_hdr; | 161 | struct hv_kvp_hdr kvp_hdr; |
185 | struct hv_kvp_msg_enumerate kvp_data; | 162 | union { |
163 | struct hv_kvp_msg_enumerate kvp_enum_data; | ||
164 | char kvp_version[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; | ||
165 | } body; | ||
186 | } __attribute__((packed)); | 166 | } __attribute__((packed)); |
187 | 167 | ||
188 | #ifdef __KERNEL__ | 168 | #ifdef __KERNEL__ |