diff options
Diffstat (limited to 'include/linux/hyperv.h')
| -rw-r--r-- | include/linux/hyperv.h | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 902c37aef67e..30d3a1f79450 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -160,16 +160,18 @@ hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi, | |||
| 160 | * 1 . 1 (Windows 7) | 160 | * 1 . 1 (Windows 7) |
| 161 | * 2 . 4 (Windows 8) | 161 | * 2 . 4 (Windows 8) |
| 162 | * 3 . 0 (Windows 8 R2) | 162 | * 3 . 0 (Windows 8 R2) |
| 163 | * 4 . 0 (Windows 10) | ||
| 163 | */ | 164 | */ |
| 164 | 165 | ||
| 165 | #define VERSION_WS2008 ((0 << 16) | (13)) | 166 | #define VERSION_WS2008 ((0 << 16) | (13)) |
| 166 | #define VERSION_WIN7 ((1 << 16) | (1)) | 167 | #define VERSION_WIN7 ((1 << 16) | (1)) |
| 167 | #define VERSION_WIN8 ((2 << 16) | (4)) | 168 | #define VERSION_WIN8 ((2 << 16) | (4)) |
| 168 | #define VERSION_WIN8_1 ((3 << 16) | (0)) | 169 | #define VERSION_WIN8_1 ((3 << 16) | (0)) |
| 170 | #define VERSION_WIN10 ((4 << 16) | (0)) | ||
| 169 | 171 | ||
| 170 | #define VERSION_INVAL -1 | 172 | #define VERSION_INVAL -1 |
| 171 | 173 | ||
| 172 | #define VERSION_CURRENT VERSION_WIN8_1 | 174 | #define VERSION_CURRENT VERSION_WIN10 |
| 173 | 175 | ||
| 174 | /* Make maximum size of pipe payload of 16K */ | 176 | /* Make maximum size of pipe payload of 16K */ |
| 175 | #define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384) | 177 | #define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384) |
| @@ -389,10 +391,7 @@ enum vmbus_channel_message_type { | |||
| 389 | CHANNELMSG_INITIATE_CONTACT = 14, | 391 | CHANNELMSG_INITIATE_CONTACT = 14, |
| 390 | CHANNELMSG_VERSION_RESPONSE = 15, | 392 | CHANNELMSG_VERSION_RESPONSE = 15, |
| 391 | CHANNELMSG_UNLOAD = 16, | 393 | CHANNELMSG_UNLOAD = 16, |
| 392 | #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD | 394 | CHANNELMSG_UNLOAD_RESPONSE = 17, |
| 393 | CHANNELMSG_VIEWRANGE_ADD = 17, | ||
| 394 | CHANNELMSG_VIEWRANGE_REMOVE = 18, | ||
| 395 | #endif | ||
| 396 | CHANNELMSG_COUNT | 395 | CHANNELMSG_COUNT |
| 397 | }; | 396 | }; |
| 398 | 397 | ||
| @@ -549,21 +548,6 @@ struct vmbus_channel_gpadl_torndown { | |||
| 549 | u32 gpadl; | 548 | u32 gpadl; |
| 550 | } __packed; | 549 | } __packed; |
| 551 | 550 | ||
| 552 | #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD | ||
| 553 | struct vmbus_channel_view_range_add { | ||
| 554 | struct vmbus_channel_message_header header; | ||
| 555 | PHYSICAL_ADDRESS viewrange_base; | ||
| 556 | u64 viewrange_length; | ||
| 557 | u32 child_relid; | ||
| 558 | } __packed; | ||
| 559 | |||
| 560 | struct vmbus_channel_view_range_remove { | ||
| 561 | struct vmbus_channel_message_header header; | ||
| 562 | PHYSICAL_ADDRESS viewrange_base; | ||
| 563 | u32 child_relid; | ||
| 564 | } __packed; | ||
| 565 | #endif | ||
| 566 | |||
| 567 | struct vmbus_channel_relid_released { | 551 | struct vmbus_channel_relid_released { |
| 568 | struct vmbus_channel_message_header header; | 552 | struct vmbus_channel_message_header header; |
| 569 | u32 child_relid; | 553 | u32 child_relid; |
| @@ -713,6 +697,11 @@ struct vmbus_channel { | |||
| 713 | /* The corresponding CPUID in the guest */ | 697 | /* The corresponding CPUID in the guest */ |
| 714 | u32 target_cpu; | 698 | u32 target_cpu; |
| 715 | /* | 699 | /* |
| 700 | * State to manage the CPU affiliation of channels. | ||
| 701 | */ | ||
| 702 | struct cpumask alloced_cpus_in_node; | ||
| 703 | int numa_node; | ||
| 704 | /* | ||
| 716 | * Support for sub-channels. For high performance devices, | 705 | * Support for sub-channels. For high performance devices, |
| 717 | * it will be useful to have multiple sub-channels to support | 706 | * it will be useful to have multiple sub-channels to support |
| 718 | * a scalable communication infrastructure with the host. | 707 | * a scalable communication infrastructure with the host. |
| @@ -745,6 +734,15 @@ struct vmbus_channel { | |||
| 745 | */ | 734 | */ |
| 746 | struct list_head sc_list; | 735 | struct list_head sc_list; |
| 747 | /* | 736 | /* |
| 737 | * Current number of sub-channels. | ||
| 738 | */ | ||
| 739 | int num_sc; | ||
| 740 | /* | ||
| 741 | * Number of a sub-channel (position within sc_list) which is supposed | ||
| 742 | * to be used as the next outgoing channel. | ||
| 743 | */ | ||
| 744 | int next_oc; | ||
| 745 | /* | ||
| 748 | * The primary channel this sub-channel belongs to. | 746 | * The primary channel this sub-channel belongs to. |
| 749 | * This will be NULL for the primary channel. | 747 | * This will be NULL for the primary channel. |
| 750 | */ | 748 | */ |
| @@ -758,9 +756,6 @@ struct vmbus_channel { | |||
| 758 | * link up channels based on their CPU affinity. | 756 | * link up channels based on their CPU affinity. |
| 759 | */ | 757 | */ |
| 760 | struct list_head percpu_list; | 758 | struct list_head percpu_list; |
| 761 | |||
| 762 | int num_sc; | ||
| 763 | int next_oc; | ||
| 764 | }; | 759 | }; |
| 765 | 760 | ||
| 766 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) | 761 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) |
| @@ -1236,13 +1231,6 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *, | |||
| 1236 | struct icmsg_negotiate *, u8 *, int, | 1231 | struct icmsg_negotiate *, u8 *, int, |
| 1237 | int); | 1232 | int); |
| 1238 | 1233 | ||
| 1239 | int hv_kvp_init(struct hv_util_service *); | ||
| 1240 | void hv_kvp_deinit(void); | ||
| 1241 | void hv_kvp_onchannelcallback(void *); | ||
| 1242 | |||
| 1243 | int hv_vss_init(struct hv_util_service *); | ||
| 1244 | void hv_vss_deinit(void); | ||
| 1245 | void hv_vss_onchannelcallback(void *); | ||
| 1246 | void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid); | 1234 | void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid); |
| 1247 | 1235 | ||
| 1248 | extern struct resource hyperv_mmio; | 1236 | extern struct resource hyperv_mmio; |
