aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2013-01-23 20:42:40 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 14:17:31 -0500
commit7fb96565e3e18ad41857ca6ffdaa9a26ae92df5a (patch)
tree8024dd5aed8477eed9ba8a8e96be3160479186fb
parent5a19b78972c39be0c5378c14c23e6c998683e80f (diff)
Drivers: hv: vmbus: Consolidate all offer GUID definitions in hyperv.h
Consolidate all GUID definitions in hyperv.h and use these definitions in implementing channel bindings (as far as interrupt delivery goes). Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/channel_mgmt.c31
-rw-r--r--include/linux/hyperv.h94
2 files changed, 100 insertions, 25 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 7478ef914b9a..53a8600162a5 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -265,36 +265,17 @@ enum {
265}; 265};
266 266
267/* 267/*
268 * This is an array of channels (devices) that are performance critical. 268 * This is an array of device_ids (device types) that are performance critical.
269 * We attempt to distribute the interrupt load for these devices across 269 * We attempt to distribute the interrupt load for these devices across
270 * all available CPUs. 270 * all available CPUs.
271 */ 271 */
272static const uuid_le hp_devs[] = { 272static const struct hv_vmbus_device_id hp_devs[] = {
273 /* {32412632-86cb-44a2-9b5c-50d1417354f5} */
274 /* IDE */ 273 /* IDE */
275 { 274 { HV_IDE_GUID, },
276 .b = {
277 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
278 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
279 }
280 },
281 /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
282 /* Storage - SCSI */ 275 /* Storage - SCSI */
283 { 276 { HV_SCSI_GUID, },
284 .b = {
285 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
286 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f
287 }
288 },
289 /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
290 /* Network */ 277 /* Network */
291 { 278 { HV_NIC_GUID, },
292 .b = {
293 0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
294 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E
295 }
296 },
297
298}; 279};
299 280
300 281
@@ -320,7 +301,7 @@ static u32 get_vp_index(uuid_le *type_guid)
320 u32 max_cpus = num_online_cpus(); 301 u32 max_cpus = num_online_cpus();
321 302
322 for (i = IDE; i < MAX_PERF_CHN; i++) { 303 for (i = IDE; i < MAX_PERF_CHN; i++) {
323 if (!memcmp(type_guid->b, hp_devs[i].b, 304 if (!memcmp(type_guid->b, hp_devs[i].guid,
324 sizeof(uuid_le))) { 305 sizeof(uuid_le))) {
325 perf_chn = true; 306 perf_chn = true;
326 break; 307 break;
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 5095b066df94..df77ba9a8166 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1159,6 +1159,100 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver);
1159 g8, g9, ga, gb, gc, gd, ge, gf }, 1159 g8, g9, ga, gb, gc, gd, ge, gf },
1160 1160
1161/* 1161/*
1162 * GUID definitions of various offer types - services offered to the guest.
1163 */
1164
1165/*
1166 * Network GUID
1167 * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
1168 */
1169#define HV_NIC_GUID \
1170 .guid = { \
1171 0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46, \
1172 0x91, 0x3f, 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e \
1173 }
1174
1175/*
1176 * IDE GUID
1177 * {32412632-86cb-44a2-9b5c-50d1417354f5}
1178 */
1179#define HV_IDE_GUID \
1180 .guid = { \
1181 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, \
1182 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5 \
1183 }
1184
1185/*
1186 * SCSI GUID
1187 * {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}
1188 */
1189#define HV_SCSI_GUID \
1190 .guid = { \
1191 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, \
1192 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f \
1193 }
1194
1195/*
1196 * Shutdown GUID
1197 * {0e0b6031-5213-4934-818b-38d90ced39db}
1198 */
1199#define HV_SHUTDOWN_GUID \
1200 .guid = { \
1201 0x31, 0x60, 0x0b, 0x0e, 0x13, 0x52, 0x34, 0x49, \
1202 0x81, 0x8b, 0x38, 0xd9, 0x0c, 0xed, 0x39, 0xdb \
1203 }
1204
1205/*
1206 * Time Synch GUID
1207 * {9527E630-D0AE-497b-ADCE-E80AB0175CAF}
1208 */
1209#define HV_TS_GUID \
1210 .guid = { \
1211 0x30, 0xe6, 0x27, 0x95, 0xae, 0xd0, 0x7b, 0x49, \
1212 0xad, 0xce, 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf \
1213 }
1214
1215/*
1216 * Heartbeat GUID
1217 * {57164f39-9115-4e78-ab55-382f3bd5422d}
1218 */
1219#define HV_HEART_BEAT_GUID \
1220 .guid = { \
1221 0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e, \
1222 0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d \
1223 }
1224
1225/*
1226 * KVP GUID
1227 * {a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}
1228 */
1229#define HV_KVP_GUID \
1230 .guid = { \
1231 0xe7, 0xf4, 0xa0, 0xa9, 0x45, 0x5a, 0x96, 0x4d, \
1232 0xb8, 0x27, 0x8a, 0x84, 0x1e, 0x8c, 0x3, 0xe6 \
1233 }
1234
1235/*
1236 * Dynamic memory GUID
1237 * {525074dc-8985-46e2-8057-a307dc18a502}
1238 */
1239#define HV_DM_GUID \
1240 .guid = { \
1241 0xdc, 0x74, 0x50, 0X52, 0x85, 0x89, 0xe2, 0x46, \
1242 0x80, 0x57, 0xa3, 0x07, 0xdc, 0x18, 0xa5, 0x02 \
1243 }
1244
1245/*
1246 * Mouse GUID
1247 * {cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}
1248 */
1249#define HV_MOUSE_GUID \
1250 .guid = { \
1251 0x9e, 0xb6, 0xa8, 0xcf, 0x4a, 0x5b, 0xc0, 0x4c, \
1252 0xb9, 0x8b, 0x8b, 0xa1, 0xa1, 0xf3, 0xf9, 0x5a \
1253 }
1254
1255/*
1162 * Common header for Hyper-V ICs 1256 * Common header for Hyper-V ICs
1163 */ 1257 */
1164 1258