Lines Matching +full:sub +full:- +full:message
1 /* SPDX-License-Identifier: GPL-2.0-only */
48 * gva: |-- 64k --|-- 64k --| ... |
59 * gva: |-- 64k --|-- 64k --| ... |-- 64k --|-- 64k --| ... |
69 * index: 0 1 2 ... 16 ... n-15 n-14 n-13 ... 2n-30
76 /* Single-page buffer */
83 /* Multiple-page buffer */
92 * Multiple-page buffer array; the pfn array is variable size:
123 * WS2012/Win8 and later versions of Hyper-V implement interrupt
125 * is set by the host on the host->guest ring buffer, and by the
126 * guest on the guest->host ring buffer.
130 * the feature bit in the guest->host ring buffer, the guest is
132 * 1) It will set the pending_send_sz field in the guest->host ring
134 * 2) It will read the pending_send_sz field in the host->guest
137 * Similarly, if the host sets the feature bit in the host->guest
139 * 1) It will set the pending_send_sz field in the host->guest ring
141 * 2) It will read the pending_send_sz field in the guest->host
158 u8 reserved2[PAGE_SIZE - 68];
175 * relatively small header (4 Kbytes on x86) to a large-ish power-of-2 ring
187 /* Calculate the proper size of a ringbuffer, it must be page-aligned */
215 dsize = rbi->ring_datasize; in hv_get_bytes_to_read()
216 read_loc = rbi->ring_buffer->read_index; in hv_get_bytes_to_read()
217 write_loc = READ_ONCE(rbi->ring_buffer->write_index); in hv_get_bytes_to_read()
219 read = write_loc >= read_loc ? (write_loc - read_loc) : in hv_get_bytes_to_read()
220 (dsize - read_loc) + write_loc; in hv_get_bytes_to_read()
229 dsize = rbi->ring_datasize; in hv_get_bytes_to_write()
230 read_loc = READ_ONCE(rbi->ring_buffer->read_index); in hv_get_bytes_to_write()
231 write_loc = rbi->ring_buffer->write_index; in hv_get_bytes_to_write()
233 write = write_loc >= read_loc ? dsize - (write_loc - read_loc) : in hv_get_bytes_to_write()
234 read_loc - write_loc; in hv_get_bytes_to_write()
245 rbi->ring_size_div10_reciprocal); in hv_get_avail_to_write_percent()
286 /* The size of the user defined data buffer for non-pipe offers. */
310 /* Non-pipes: The user has MAX_USER_DEFINED_BYTES bytes. */
318 * is implemented on top of standard user-defined data. Pipe
329 * primary channel and a value of non-zero means a sub-channel.
418 u32 reserved; /* for alignment to a 8-byte boundary */
422 * This is the format for a GPA-Direct packet, which contains a set of GPA
453 ((struct vmpacket_descriptor)__packet)->offset8 * 8)
456 ((((struct vmpacket_descriptor)__packet)->len8 - \
457 ((struct vmpacket_descriptor)__packet)->offset8) * 8)
460 (((struct IMPACT)__packet)->type)
512 /* Hyper-V supports about 2048 channels, and the RELIDs start with 1. */
566 * Request Offer -- no parameters, SynIC message contains the partition ID
567 * Set Snoop -- no parameters, SynIC message contains the partition ID
568 * Clear Snoop -- no parameters, SynIC message contains the partition ID
569 * All Offers Delivered -- no parameters, SynIC message contains the partition
571 * Flush Client -- no parameters, SynIC message contains the partition ID
604 /* User-specific data to be passed along to the server endpoint. */
629 /* Channel Message GPADL */
635 * The number of PFNs in a GPADL message is defined by the number of
638 * follow-up packet that contains more.
696 /* Hyper-V socket: guest's connect()-ing to host */
719 * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate Contact Message,
720 * and for subsequent messages, we must use the Message Connection ID
721 * field in the host-returned Version Response Message.
737 * variable-size data structure depending on the msg type itself
743 /* So far, this is only used to handle gpadl body message */
760 * The channel message that goes out on the "wire".
805 #define VMBUS_RQST_ERROR (U64_MAX - 1)
807 /* NetVSC-specific */
808 #define VMBUS_RQST_ID_NO_RESPONSE (U64_MAX - 2)
809 /* StorVSC-specific */
810 #define VMBUS_RQST_INIT (U64_MAX - 2)
811 #define VMBUS_RQST_RESET (U64_MAX - 3)
894 * BATCHED - callback called from taslket and should read
897 * DIRECT - callback called from tasklet (softirq).
898 * ISR - callback called in interrupt context and must
900 * Host interrupts are disabled and must be re-enabled
923 * Support for sub-channels. For high performance devices,
924 * it will be useful to have multiple sub-channels to support
926 * The support for sub-channels is implemented as an extension
929 * offer message will indicate if the host supports sub-channels.
930 * The guest is free to ask for sub-channels to be offered and can
931 * open these sub-channels as a normal "primary" channel. However,
932 * all sub-channels will have the same type and instance guids as the
938 * Sub-channel creation callback. This callback will be called in
939 * process context when a sub-channel offer is received from the host.
940 * The guest can open the sub-channel in the context of this callback.
951 * All Sub-channels of a primary channel are linked here.
955 * The primary channel this sub-channel belongs to.
960 * Support per-channel state for use by vmbus drivers.
971 * For sysfs per-channel properties.
977 * etc,), Hyper-V has a mechanism to enhance the throughput
982 * of time is the monitor latency - currently around 100 usecs. This
985 * A) Making the host more efficient - each time it wakes up,
1011 * We must offload the handling of the primary/sub channels
1012 * from the single-threaded vmbus_connection.work_queue to
1043 * The Message delay will delay guest reading on a per message basis
1065 struct vmbus_requestor *rqstor = &(channel)->requestor; \
1067 spin_lock_irqsave(&rqstor->req_lock, flags); \
1073 struct vmbus_requestor *rqstor = &channel->requestor; in unlock_requestor()
1075 spin_unlock_irqrestore(&rqstor->req_lock, flags); in unlock_requestor()
1087 return !!(o->offer.chn_flags & VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); in is_hvsock_offer()
1092 return is_hvsock_offer(&c->offermsg); in is_hvsock_channel()
1097 return c->offermsg.offer.sub_channel_index != 0; in is_sub_channel()
1103 c->callback_mode = mode; in set_channel_read_mode()
1108 c->per_channel_state = s; in set_per_channel_state()
1113 return c->per_channel_state; in get_per_channel_state()
1122 spin_lock_irqsave(&c->outbound.ring_lock, flags); in set_channel_pending_send_size()
1123 ++c->out_full_total; in set_channel_pending_send_size()
1125 if (!c->out_full_flag) { in set_channel_pending_send_size()
1126 ++c->out_full_first; in set_channel_pending_send_size()
1127 c->out_full_flag = true; in set_channel_pending_send_size()
1129 spin_unlock_irqrestore(&c->outbound.ring_lock, flags); in set_channel_pending_send_size()
1131 c->out_full_flag = false; in set_channel_pending_send_size()
1134 c->outbound.ring_buffer->pending_send_sz = size; in set_channel_pending_send_size()
1142 * APIs for managing sub-channels.
1266 * However, to facilitate the notification of new-offer/rescind-offer
1328 dev_set_drvdata(&dev->device, data); in hv_set_drvdata()
1333 return dev_get_drvdata(&dev->device); in hv_get_drvdata()
1367 * GUID definitions of various offer types - services offered to the guest.
1372 * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
1380 * {32412632-86cb-44a2-9b5c-50d1417354f5}
1388 * {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}
1396 * {0e0b6031-5213-4934-818b-38d90ced39db}
1404 * {9527E630-D0AE-497b-ADCE-E80AB0175CAF}
1412 * {57164f39-9115-4e78-ab55-382f3bd5422d}
1420 * {a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}
1428 * {525074dc-8985-46e2-8057-a307dc18a502}
1436 * {cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}
1444 * {f912ad6d-2b17-48ea-bd65-f927a61c7684}
1458 * {DA0A7802-E377-4aac-8E77-0558EB1073F8}
1466 * {2f9bcc4a-0069-4af3-b76b-6fd0be528cda}
1474 * {34D14BE3-DEE4-41c8-9AE7-6B174977C192}
1483 * {8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}
1491 * {44C4F61D-4444-4400-9D52-802E27EDE19F}
1503 * {f8e65716-3cb3-4a06-9a60-1889c5cccab5}
1504 * {3375baf4-9e15-4b30-b765-67acb10d607b}
1505 * {276aacf4-ac15-426c-98dd-7521ad3f01fe}
1506 * {c376c1c3-d276-48d2-90a9-c04748072c60}
1526 * Common header for Hyper-V ICs
1669 return ring_info->ring_buffer->buffer; in hv_get_ring_buffer()
1677 rbi->ring_buffer->interrupt_mask = 1; in hv_begin_read()
1684 * Re-enable host callback and return number of outstanding bytes
1689 rbi->ring_buffer->interrupt_mask = 0; in hv_end_read()
1703 * An API to support in-place processing of incoming VMBUS packets.
1709 return (void *)((unsigned long)desc + (desc->offset8 << 3)); in hv_pkt_data()
1715 return (desc->len8 << 3) - (desc->offset8 << 3); in hv_pkt_datalen()
1721 return desc->len8 << 3; in hv_pkt_len()
1751 * Interface for passing data between SR-IOV PF and VF drivers. The VF driver
1794 #define HVPFN_UP(x) (((x) + HV_HYP_PAGE_SIZE-1) >> HV_HYP_PAGE_SHIFT)