Index: hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c
===================================================================
--- hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c	(revision 337)
+++ hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c	(working copy)
@@ -267,10 +267,10 @@
 {
   call_result_t rc;
   MOSAL_iobuf_t new_iobuf;	// new allocated IOBUF object
-  MT_virt_addr_t seg_va = va;	// current segment start
-  MT_size_t seg_size = size;	// current segment size
-  MT_size_t rdc = size;			// remain data counter - what is rest to lock
-  MT_size_t delta;				// he size of the last not full page of the first segment
+  MT_virt_addr_t seg_va;	// current segment start
+  MT_size_t seg_size;		// current segment size
+  MT_size_t rdc;			// remain data counter - what is rest to lock
+  MT_size_t delta;			// he size of the last not full page of the first segment
   MOSAL_iobuf_seg_t iobuf_seg_p; 	// pointer to current segment object
   unsigned page_size;
   
@@ -297,6 +297,13 @@
   MOSAL_dlist_init_head( &new_iobuf->seg_que );
   new_iobuf->seg_num = 0;
 
+  // Round the seg_va down to a page boundary so that we always get a seg_size
+  // that is an integral number of pages.
+  delta = va & (PAGE_SIZE - 1);
+  seg_va = va - delta;
+  // Since we rounded down the seg_va, we need to round up the rdc and size.
+  seg_size = rdc = size + delta;
+
   // allocate segments
   while (rdc > 0) {
   	// map a segment
