History

vmbus: Switch to use new generic UUID API

There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here.

Andy Shevchenko committed 7 years ago

Commit 593db801 parent 8834f565 files · +79 −93Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/hyperv.h+49−49
@@ -222,8 +222,8 @@ static inline u32 hv_get_avail_to_write_percent( · 221 unmodified lines
222222 * struct contains the fundamental information about an offer.
223223 */
224224 struct vmbus_channel_offer {
225− uuid_le if_type;
226− uuid_le if_instance;
225+ guid_t if_type;
226+ guid_t if_instance;
227227
228228 /*
229229 * These two fields are not currently used.
@@ -614,8 +614,8 @@ struct vmbus_channel_initiate_contact { · 384 unmodified lines
614614 /* Hyper-V socket: guest's connect()-ing to host */
615615 struct vmbus_channel_tl_connect_request {
616616 struct vmbus_channel_message_header header;
617− uuid_le guest_endpoint_id;
618− uuid_le host_service_id;
617+ guid_t guest_endpoint_id;
618+ guid_t host_service_id;
619619 } __packed;
620620
621621 struct vmbus_channel_version_response {
@@ -714,7 +714,7 @@ enum vmbus_device_type { · 92 unmodified lines
714714
715715 struct vmbus_device {
716716 u16 dev_type;
717− uuid_le guid;
717+ guid_t guid;
718718 bool perf_device;
719719 };
720720
@@ -1096,7 +1096,7 @@ struct hv_driver { · 375 unmodified lines
10961096 bool hvsock;
10971097
10981098 /* the device type supported by this driver */
1099− uuid_le dev_type;
1099+ guid_t dev_type;
11001100 const struct hv_vmbus_device_id *id_table;
11011101
11021102 struct device_driver driver;
@@ -1116,10 +1116,10 @@ struct hv_driver { · 13 unmodified lines
11161116 /* Base device object */
11171117 struct hv_device {
11181118 /* the device type id of this device */
1119− uuid_le dev_type;
1119+ guid_t dev_type;
11201120
11211121 /* the device instance id of this device */
1122− uuid_le dev_instance;
1122+ guid_t dev_instance;
11231123 u16 vendor_id;
11241124 u16 device_id;
11251125
@@ -1188,102 +1188,102 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size); · 62 unmodified lines
11881188 * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
11891189 */
11901190 #define HV_NIC_GUID \
1191− .guid = UUID_LE(0xf8615163, 0xdf3e, 0x46c5, 0x91, 0x3f, \
1192− 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e)
1191+ .guid = GUID_INIT(0xf8615163, 0xdf3e, 0x46c5, 0x91, 0x3f, \
1192+ 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e)
11931193
11941194 /*
11951195 * IDE GUID
11961196 * {32412632-86cb-44a2-9b5c-50d1417354f5}
11971197 */
11981198 #define HV_IDE_GUID \
1199− .guid = UUID_LE(0x32412632, 0x86cb, 0x44a2, 0x9b, 0x5c, \
1200− 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5)
1199+ .guid = GUID_INIT(0x32412632, 0x86cb, 0x44a2, 0x9b, 0x5c, \
1200+ 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5)
12011201
12021202 /*
12031203 * SCSI GUID
12041204 * {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}
12051205 */
12061206 #define HV_SCSI_GUID \
1207− .guid = UUID_LE(0xba6163d9, 0x04a1, 0x4d29, 0xb6, 0x05, \
1208− 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f)
1207+ .guid = GUID_INIT(0xba6163d9, 0x04a1, 0x4d29, 0xb6, 0x05, \
1208+ 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f)
12091209
12101210 /*
12111211 * Shutdown GUID
12121212 * {0e0b6031-5213-4934-818b-38d90ced39db}
12131213 */
12141214 #define HV_SHUTDOWN_GUID \
1215− .guid = UUID_LE(0x0e0b6031, 0x5213, 0x4934, 0x81, 0x8b, \
1216− 0x38, 0xd9, 0x0c, 0xed, 0x39, 0xdb)
1215+ .guid = GUID_INIT(0x0e0b6031, 0x5213, 0x4934, 0x81, 0x8b, \
1216+ 0x38, 0xd9, 0x0c, 0xed, 0x39, 0xdb)
12171217
12181218 /*
12191219 * Time Synch GUID
12201220 * {9527E630-D0AE-497b-ADCE-E80AB0175CAF}
12211221 */
12221222 #define HV_TS_GUID \
1223− .guid = UUID_LE(0x9527e630, 0xd0ae, 0x497b, 0xad, 0xce, \
1224− 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf)
1223+ .guid = GUID_INIT(0x9527e630, 0xd0ae, 0x497b, 0xad, 0xce, \
1224+ 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf)
12251225
12261226 /*
12271227 * Heartbeat GUID
12281228 * {57164f39-9115-4e78-ab55-382f3bd5422d}
12291229 */
12301230 #define HV_HEART_BEAT_GUID \
1231− .guid = UUID_LE(0x57164f39, 0x9115, 0x4e78, 0xab, 0x55, \
1232− 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d)
1231+ .guid = GUID_INIT(0x57164f39, 0x9115, 0x4e78, 0xab, 0x55, \
1232+ 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d)
12331233
12341234 /*
12351235 * KVP GUID
12361236 * {a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}
12371237 */
12381238 #define HV_KVP_GUID \
1239− .guid = UUID_LE(0xa9a0f4e7, 0x5a45, 0x4d96, 0xb8, 0x27, \
1240− 0x8a, 0x84, 0x1e, 0x8c, 0x03, 0xe6)
1239+ .guid = GUID_INIT(0xa9a0f4e7, 0x5a45, 0x4d96, 0xb8, 0x27, \
1240+ 0x8a, 0x84, 0x1e, 0x8c, 0x03, 0xe6)
12411241
12421242 /*
12431243 * Dynamic memory GUID
12441244 * {525074dc-8985-46e2-8057-a307dc18a502}
12451245 */
12461246 #define HV_DM_GUID \
1247− .guid = UUID_LE(0x525074dc, 0x8985, 0x46e2, 0x80, 0x57, \
1248− 0xa3, 0x07, 0xdc, 0x18, 0xa5, 0x02)
1247+ .guid = GUID_INIT(0x525074dc, 0x8985, 0x46e2, 0x80, 0x57, \
1248+ 0xa3, 0x07, 0xdc, 0x18, 0xa5, 0x02)
12491249
12501250 /*
12511251 * Mouse GUID
12521252 * {cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}
12531253 */
12541254 #define HV_MOUSE_GUID \
1255− .guid = UUID_LE(0xcfa8b69e, 0x5b4a, 0x4cc0, 0xb9, 0x8b, \
1256− 0x8b, 0xa1, 0xa1, 0xf3, 0xf9, 0x5a)
1255+ .guid = GUID_INIT(0xcfa8b69e, 0x5b4a, 0x4cc0, 0xb9, 0x8b, \
1256+ 0x8b, 0xa1, 0xa1, 0xf3, 0xf9, 0x5a)
12571257
12581258 /*
12591259 * Keyboard GUID
12601260 * {f912ad6d-2b17-48ea-bd65-f927a61c7684}
12611261 */
12621262 #define HV_KBD_GUID \
1263− .guid = UUID_LE(0xf912ad6d, 0x2b17, 0x48ea, 0xbd, 0x65, \
1264− 0xf9, 0x27, 0xa6, 0x1c, 0x76, 0x84)
1263+ .guid = GUID_INIT(0xf912ad6d, 0x2b17, 0x48ea, 0xbd, 0x65, \
1264+ 0xf9, 0x27, 0xa6, 0x1c, 0x76, 0x84)
12651265
12661266 /*
12671267 * VSS (Backup/Restore) GUID
12681268 */
12691269 #define HV_VSS_GUID \
1270− .guid = UUID_LE(0x35fa2e29, 0xea23, 0x4236, 0x96, 0xae, \
1271− 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40)
1270+ .guid = GUID_INIT(0x35fa2e29, 0xea23, 0x4236, 0x96, 0xae, \
1271+ 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40)
12721272 /*
12731273 * Synthetic Video GUID
12741274 * {DA0A7802-E377-4aac-8E77-0558EB1073F8}
12751275 */
12761276 #define HV_SYNTHVID_GUID \
1277− .guid = UUID_LE(0xda0a7802, 0xe377, 0x4aac, 0x8e, 0x77, \
1278− 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8)
1277+ .guid = GUID_INIT(0xda0a7802, 0xe377, 0x4aac, 0x8e, 0x77, \
1278+ 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8)
12791279
12801280 /*
12811281 * Synthetic FC GUID
12821282 * {2f9bcc4a-0069-4af3-b76b-6fd0be528cda}
12831283 */
12841284 #define HV_SYNTHFC_GUID \
1285− .guid = UUID_LE(0x2f9bcc4a, 0x0069, 0x4af3, 0xb7, 0x6b, \
1286− 0x6f, 0xd0, 0xbe, 0x52, 0x8c, 0xda)
1285+ .guid = GUID_INIT(0x2f9bcc4a, 0x0069, 0x4af3, 0xb7, 0x6b, \
1286+ 0x6f, 0xd0, 0xbe, 0x52, 0x8c, 0xda)
12871287
12881288 /*
12891289 * Guest File Copy Service
@@ -1291,16 +1291,16 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size); · 1 unmodified line
12911291 */
12921292
12931293 #define HV_FCOPY_GUID \
1294− .guid = UUID_LE(0x34d14be3, 0xdee4, 0x41c8, 0x9a, 0xe7, \
1295− 0x6b, 0x17, 0x49, 0x77, 0xc1, 0x92)
1294+ .guid = GUID_INIT(0x34d14be3, 0xdee4, 0x41c8, 0x9a, 0xe7, \
1295+ 0x6b, 0x17, 0x49, 0x77, 0xc1, 0x92)
12961296
12971297 /*
12981298 * NetworkDirect. This is the guest RDMA service.
12991299 * {8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}
13001300 */
13011301 #define HV_ND_GUID \
1302− .guid = UUID_LE(0x8c2eaf3d, 0x32a7, 0x4b09, 0xab, 0x99, \
1303− 0xbd, 0x1f, 0x1c, 0x86, 0xb5, 0x01)
1302+ .guid = GUID_INIT(0x8c2eaf3d, 0x32a7, 0x4b09, 0xab, 0x99, \
1303+ 0xbd, 0x1f, 0x1c, 0x86, 0xb5, 0x01)
13041304
13051305 /*
13061306 * PCI Express Pass Through
@@ -1308,8 +1308,8 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size); · 1 unmodified line
13081308 */
13091309
13101310 #define HV_PCIE_GUID \
1311− .guid = UUID_LE(0x44c4f61d, 0x4444, 0x4400, 0x9d, 0x52, \
1312− 0x80, 0x2e, 0x27, 0xed, 0xe1, 0x9f)
1311+ .guid = GUID_INIT(0x44c4f61d, 0x4444, 0x4400, 0x9d, 0x52, \
1312+ 0x80, 0x2e, 0x27, 0xed, 0xe1, 0x9f)
13131313
13141314 /*
13151315 * Linux doesn't support the 3 devices: the first two are for
@@ -1321,16 +1321,16 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size); · 5 unmodified lines
13211321 */
13221322
13231323 #define HV_AVMA1_GUID \
1324− .guid = UUID_LE(0xf8e65716, 0x3cb3, 0x4a06, 0x9a, 0x60, \
1325− 0x18, 0x89, 0xc5, 0xcc, 0xca, 0xb5)
1324+ .guid = GUID_INIT(0xf8e65716, 0x3cb3, 0x4a06, 0x9a, 0x60, \
1325+ 0x18, 0x89, 0xc5, 0xcc, 0xca, 0xb5)
13261326
13271327 #define HV_AVMA2_GUID \
1328− .guid = UUID_LE(0x3375baf4, 0x9e15, 0x4b30, 0xb7, 0x65, \
1329− 0x67, 0xac, 0xb1, 0x0d, 0x60, 0x7b)
1328+ .guid = GUID_INIT(0x3375baf4, 0x9e15, 0x4b30, 0xb7, 0x65, \
1329+ 0x67, 0xac, 0xb1, 0x0d, 0x60, 0x7b)
13301330
13311331 #define HV_RDV_GUID \
1332− .guid = UUID_LE(0x276aacf4, 0xac15, 0x426c, 0x98, 0xdd, \
1333− 0x75, 0x21, 0xad, 0x3f, 0x01, 0xfe)
1332+ .guid = GUID_INIT(0x276aacf4, 0xac15, 0x426c, 0x98, 0xdd, \
1333+ 0x75, 0x21, 0xad, 0x3f, 0x01, 0xfe)
13341334
13351335 /*
13361336 * Common header for Hyper-V ICs
@@ -1432,7 +1432,7 @@ struct ictimesync_ref_data { · 95 unmodified lines
14321432 struct hyperv_service_callback {
14331433 u8 msg_type;
14341434 char *log_msg;
1435− uuid_le data;
1435+ guid_t data;
14361436 struct vmbus_channel *channel;
14371437 void (*callback)(void *context);
14381438 };
@@ -1452,8 +1452,8 @@ void vmbus_setevent(struct vmbus_channel *channel); · 13 unmodified lines
14521452
14531453 extern __u32 vmbus_proto_version;
14541454
1455−int vmbus_send_tl_connect_request(const uuid_le *shv_guest_servie_id,
1456− const uuid_le *shv_host_servie_id);
1455+int vmbus_send_tl_connect_request(const guid_t *shv_guest_servie_id,
1456+ const guid_t *shv_host_servie_id);
14571457 void vmbus_set_event(struct vmbus_channel *channel);
14581458
14591459 /* Get the start of the ring buffer. */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t