diff options
| -rw-r--r-- | sys/dev/hyperv/include/hyperv.h | 28 | ||||
| -rw-r--r-- | sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 4 | ||||
| -rw-r--r-- | sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 8 | ||||
| -rw-r--r-- | sys/dev/hyperv/utilities/hv_heartbeat.c | 2 | ||||
| -rw-r--r-- | sys/dev/hyperv/utilities/hv_kvp.c | 2 | ||||
| -rw-r--r-- | sys/dev/hyperv/utilities/hv_shutdown.c | 2 | ||||
| -rw-r--r-- | sys/dev/hyperv/utilities/hv_timesync.c | 2 | ||||
| -rw-r--r-- | sys/dev/hyperv/vmbus/hv_channel_mgmt.c | 4 | ||||
| -rw-r--r-- | sys/dev/hyperv/vmbus/hv_vmbus_priv.h | 4 | ||||
| -rw-r--r-- | sys/dev/hyperv/vmbus/hyperv.c | 4 | ||||
| -rw-r--r-- | sys/dev/hyperv/vmbus/vmbus.c | 5 | ||||
| -rw-r--r-- | sys/dev/hyperv/vmbus/vmbus_if.m | 4 |
12 files changed, 29 insertions, 40 deletions
diff --git a/sys/dev/hyperv/include/hyperv.h b/sys/dev/hyperv/include/hyperv.h index 156100f546b5..b8c68236b0a4 100644 --- a/sys/dev/hyperv/include/hyperv.h +++ b/sys/dev/hyperv/include/hyperv.h @@ -121,25 +121,13 @@ typedef uint8_t hv_bool_uint8_t; ((HV_ALIGN_UP(addr+len, PAGE_SIZE) - \ HV_ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT ) -typedef struct hv_guid { - uint8_t data[16]; -} __packed hv_guid; +struct hyperv_guid { + uint8_t hv_guid[16]; +} __packed; #define HYPERV_GUID_STRLEN 40 -int hyperv_guid2str(const struct hv_guid *, char *, size_t); - -#define HV_NIC_GUID \ - .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, \ - 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E} - -#define HV_IDE_GUID \ - .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, \ - 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5} - -#define HV_SCSI_GUID \ - .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, \ - 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f} +int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); /* * At the center of the Channel Management library is @@ -148,8 +136,8 @@ int hyperv_guid2str(const struct hv_guid *, char *, size_t); */ typedef struct hv_vmbus_channel_offer { - hv_guid interface_type; - hv_guid interface_instance; + struct hyperv_guid interface_type; + struct hyperv_guid interface_instance; uint64_t interrupt_latency_in_100ns_units; uint32_t interface_revision; uint32_t server_context_area_size; /* in bytes */ @@ -477,8 +465,8 @@ typedef struct hv_vmbus_channel { TAILQ_ENTRY(hv_vmbus_channel) ch_link; uint32_t ch_subidx; /* subchan index */ - struct hv_guid ch_guid_type; - struct hv_guid ch_guid_inst; + struct hyperv_guid ch_guid_type; + struct hyperv_guid ch_guid_inst; struct sysctl_ctx_list ch_sysctl_ctx; } hv_vmbus_channel; diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index 95e2b1267f3d..09e1df76ad6a 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -399,8 +399,8 @@ hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ -static const hv_guid g_net_vsc_device_type = { - .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, +static const struct hyperv_guid g_net_vsc_device_type = { + .hv_guid = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E} }; diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 86a878e7839d..05abf2ac57ad 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -180,14 +180,14 @@ enum hv_storage_type { #define HV_STORAGE_SUPPORTS_MULTI_CHANNEL 0x1 /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */ -static const hv_guid gStorVscDeviceType={ - .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, +static const struct hyperv_guid gStorVscDeviceType={ + .hv_guid = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f} }; /* {32412632-86cb-44a2-9b5c-50d1417354f5} */ -static const hv_guid gBlkVscDeviceType={ - .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, +static const struct hyperv_guid gBlkVscDeviceType={ + .hv_guid = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5} }; diff --git a/sys/dev/hyperv/utilities/hv_heartbeat.c b/sys/dev/hyperv/utilities/hv_heartbeat.c index 6438e9193d06..b8ac7f0e0616 100644 --- a/sys/dev/hyperv/utilities/hv_heartbeat.c +++ b/sys/dev/hyperv/utilities/hv_heartbeat.c @@ -39,7 +39,7 @@ #include "vmbus_if.h" /* Heartbeat Service */ -static const hv_guid service_guid = { .data = +static const struct hyperv_guid service_guid = { .hv_guid = {0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e, 0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d} }; diff --git a/sys/dev/hyperv/utilities/hv_kvp.c b/sys/dev/hyperv/utilities/hv_kvp.c index 0b23af8e7384..a96d535daa1c 100644 --- a/sys/dev/hyperv/utilities/hv_kvp.c +++ b/sys/dev/hyperv/utilities/hv_kvp.c @@ -90,7 +90,7 @@ static int hv_kvp_log = 0; log(LOG_INFO, "hv_kvp: " __VA_ARGS__); \ } while (0) -static const hv_guid service_guid = { .data = +static const struct hyperv_guid service_guid = { .hv_guid = {0xe7, 0xf4, 0xa0, 0xa9, 0x45, 0x5a, 0x96, 0x4d, 0xb8, 0x27, 0x8a, 0x84, 0x1e, 0x8c, 0x3, 0xe6} }; diff --git a/sys/dev/hyperv/utilities/hv_shutdown.c b/sys/dev/hyperv/utilities/hv_shutdown.c index 81cd7e0daa1e..949c74b0b041 100644 --- a/sys/dev/hyperv/utilities/hv_shutdown.c +++ b/sys/dev/hyperv/utilities/hv_shutdown.c @@ -43,7 +43,7 @@ #include "hv_util.h" #include "vmbus_if.h" -static const hv_guid service_guid = { .data = +static const struct hyperv_guid service_guid = { .hv_guid = {0x31, 0x60, 0x0B, 0X0E, 0x13, 0x52, 0x34, 0x49, 0x81, 0x8B, 0x38, 0XD9, 0x0C, 0xED, 0x39, 0xDB} }; diff --git a/sys/dev/hyperv/utilities/hv_timesync.c b/sys/dev/hyperv/utilities/hv_timesync.c index c114858708be..2a11a1714251 100644 --- a/sys/dev/hyperv/utilities/hv_timesync.c +++ b/sys/dev/hyperv/utilities/hv_timesync.c @@ -55,7 +55,7 @@ typedef struct { } time_sync_data; /* Time Synch Service */ -static const hv_guid service_guid = {.data = +static const struct hyperv_guid service_guid = {.hv_guid = {0x30, 0xe6, 0x27, 0x95, 0xae, 0xd0, 0x7b, 0x49, 0xad, 0xce, 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf } }; diff --git a/sys/dev/hyperv/vmbus/hv_channel_mgmt.c b/sys/dev/hyperv/vmbus/hv_channel_mgmt.c index 258221e8119a..f4b51fb1aaad 100644 --- a/sys/dev/hyperv/vmbus/hv_channel_mgmt.c +++ b/sys/dev/hyperv/vmbus/hv_channel_mgmt.c @@ -128,9 +128,9 @@ vmbus_channel_process_offer(hv_vmbus_channel *new_channel) TAILQ_FOREACH(channel, &sc->vmbus_chlist, ch_link) { if (memcmp(&channel->ch_guid_type, &new_channel->ch_guid_type, - sizeof(hv_guid)) == 0 && + sizeof(struct hyperv_guid)) == 0 && memcmp(&channel->ch_guid_inst, &new_channel->ch_guid_inst, - sizeof(hv_guid)) == 0) + sizeof(struct hyperv_guid)) == 0) break; } diff --git a/sys/dev/hyperv/vmbus/hv_vmbus_priv.h b/sys/dev/hyperv/vmbus/hv_vmbus_priv.h index 835369d23fc7..9ceb27dc205e 100644 --- a/sys/dev/hyperv/vmbus/hv_vmbus_priv.h +++ b/sys/dev/hyperv/vmbus/hv_vmbus_priv.h @@ -56,8 +56,8 @@ typedef struct { typedef struct { uint32_t rel_id; hv_vmbus_channel_state state; - hv_guid interface_type; - hv_guid interface_instance; + struct hyperv_guid interface_type; + struct hyperv_guid interface_instance; uint32_t monitor_id; uint32_t server_monitor_pending; uint32_t server_monitor_latency; diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index c4f7c014cd61..3040e533b23a 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -116,9 +116,9 @@ hypercall_signal_event(bus_addr_t monprm_paddr) } int -hyperv_guid2str(const struct hv_guid *guid, char *buf, size_t sz) +hyperv_guid2str(const struct hyperv_guid *guid, char *buf, size_t sz) { - const uint8_t *d = guid->data; + const uint8_t *d = guid->hv_guid; return snprintf(buf, sz, "%02x%02x%02x%02x-" "%02x%02x-%02x%02x-%02x%02x-" diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index bc7847734ad8..5e4a48969b2c 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -1051,11 +1051,12 @@ vmbus_get_version_method(device_t bus, device_t dev) } static int -vmbus_probe_guid_method(device_t bus, device_t dev, const struct hv_guid *guid) +vmbus_probe_guid_method(device_t bus, device_t dev, + const struct hyperv_guid *guid) { const struct hv_vmbus_channel *chan = vmbus_get_channel(dev); - if (memcmp(&chan->ch_guid_type, guid, sizeof(struct hv_guid)) == 0) + if (memcmp(&chan->ch_guid_type, guid, sizeof(struct hyperv_guid)) == 0) return 0; return ENXIO; } diff --git a/sys/dev/hyperv/vmbus/vmbus_if.m b/sys/dev/hyperv/vmbus/vmbus_if.m index 3281ad2f2043..592f45f5d88c 100644 --- a/sys/dev/hyperv/vmbus/vmbus_if.m +++ b/sys/dev/hyperv/vmbus/vmbus_if.m @@ -32,7 +32,7 @@ INTERFACE vmbus; HEADER { - struct hv_guid; + struct hyperv_guid; }; METHOD uint32_t get_version { @@ -43,5 +43,5 @@ METHOD uint32_t get_version { METHOD int probe_guid { device_t bus; device_t dev; - const struct hv_guid *guid; + const struct hyperv_guid *guid; }; |
