Drivers: hv: Update the ring buffer structure to match win8 functionality
authorK. Y. Srinivasan <kys@microsoft.com>
Sat, 1 Dec 2012 14:46:39 +0000 (06:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 19:34:36 +0000 (11:34 -0800)
Update the ringbuffer structure to support win8 functionality.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/hyperv.h

index b097bf9..2b54801 100644 (file)
@@ -325,14 +325,28 @@ struct hv_ring_buffer {
 
        u32 interrupt_mask;
 
-       /* Pad it to PAGE_SIZE so that data starts on page boundary */
-       u8      reserved[4084];
-
-       /* NOTE:
-        * The interrupt_mask field is used only for channels but since our
-        * vmbus connection also uses this data structure and its data starts
-        * here, we commented out this field.
+       /*
+        * Win8 uses some of the reserved bits to implement
+        * interrupt driven flow management. On the send side
+        * we can request that the receiver interrupt the sender
+        * when the ring transitions from being full to being able
+        * to handle a message of size "pending_send_sz".
+        *
+        * Add necessary state for this enhancement.
         */
+       u32 pending_send_sz;
+
+       u32 reserved1[12];
+
+       union {
+               struct {
+                       u32 feat_pending_send_sz:1;
+               };
+               u32 value;
+       } feature_bits;
+
+       /* Pad it to PAGE_SIZE so that data starts on page boundary */
+       u8      reserved2[4028];
 
        /*
         * Ring data starts here + RingDataStartOffset