aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 476c685ca6f9..5a2ba674795e 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -57,6 +57,18 @@ struct hv_multipage_buffer {
57 u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT]; 57 u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT];
58}; 58};
59 59
60/*
61 * Multiple-page buffer array; the pfn array is variable size:
62 * The number of entries in the PFN array is determined by
63 * "len" and "offset".
64 */
65struct hv_mpb_array {
66 /* Length and Offset determines the # of pfns in the array */
67 u32 len;
68 u32 offset;
69 u64 pfn_array[];
70};
71
60/* 0x18 includes the proprietary packet header */ 72/* 0x18 includes the proprietary packet header */
61#define MAX_PAGE_BUFFER_PACKET (0x18 + \ 73#define MAX_PAGE_BUFFER_PACKET (0x18 + \
62 (sizeof(struct hv_page_buffer) * \ 74 (sizeof(struct hv_page_buffer) * \
@@ -722,7 +734,12 @@ struct vmbus_channel {
722 */ 734 */
723 void (*sc_creation_callback)(struct vmbus_channel *new_sc); 735 void (*sc_creation_callback)(struct vmbus_channel *new_sc);
724 736
725 spinlock_t sc_lock; 737 /*
738 * The spinlock to protect the structure. It is being used to protect
739 * test-and-set access to various attributes of the structure as well
740 * as all sc_list operations.
741 */
742 spinlock_t lock;
726 /* 743 /*
727 * All Sub-channels of a primary channel are linked here. 744 * All Sub-channels of a primary channel are linked here.
728 */ 745 */
@@ -814,6 +831,18 @@ struct vmbus_channel_packet_multipage_buffer {
814 struct hv_multipage_buffer range; 831 struct hv_multipage_buffer range;
815} __packed; 832} __packed;
816 833
834/* The format must be the same as struct vmdata_gpa_direct */
835struct vmbus_packet_mpb_array {
836 u16 type;
837 u16 dataoffset8;
838 u16 length8;
839 u16 flags;
840 u64 transactionid;
841 u32 reserved;
842 u32 rangecount; /* Always 1 in this case */
843 struct hv_mpb_array range;
844} __packed;
845
817 846
818extern int vmbus_open(struct vmbus_channel *channel, 847extern int vmbus_open(struct vmbus_channel *channel,
819 u32 send_ringbuffersize, 848 u32 send_ringbuffersize,
@@ -845,6 +874,13 @@ extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
845 u32 bufferlen, 874 u32 bufferlen,
846 u64 requestid); 875 u64 requestid);
847 876
877extern int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
878 struct vmbus_packet_mpb_array *mpb,
879 u32 desc_size,
880 void *buffer,
881 u32 bufferlen,
882 u64 requestid);
883
848extern int vmbus_establish_gpadl(struct vmbus_channel *channel, 884extern int vmbus_establish_gpadl(struct vmbus_channel *channel,
849 void *kbuffer, 885 void *kbuffer,
850 u32 size, 886 u32 size,