win-pvdrivers

changeset 433:b1da81cc9868

updates
author James Harper <james.harper@bendigoit.com.au>
date Tue Oct 14 10:45:56 2008 +1100 (2008-10-14)
parents 68565fbe4425
children b6fb4cf3e0fa
files doc/BUILDING.txt xennet/xennet_common.c xennet/xennet_rx.c xenpci/evtchn.c
line diff
     1.1 --- a/doc/BUILDING.txt	Wed Sep 17 23:28:47 2008 +1000
     1.2 +++ b/doc/BUILDING.txt	Tue Oct 14 10:45:56 2008 +1100
     1.3 @@ -13,8 +13,7 @@ http://nsis.sourceforge.net/
     1.4  3. Use Mercurial (get it from 
     1.5  http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages) to get 
     1.6  the latest sources from 
     1.7 -http://xenbits.xensource.com/ext/win-pvdrivers.hg. The current branch
     1.8 -is wdm so you'll need to specify that branch.
     1.9 +http://xenbits.xensource.com/ext/win-pvdrivers.hg.
    1.10  
    1.11  4. Build the shutdown monitor using Visual Studio. If you don't build it,
    1.12  then you'll need to edit it out of installer.nsi before the next step.
     2.1 --- a/xennet/xennet_common.c	Wed Sep 17 23:28:47 2008 +1000
     2.2 +++ b/xennet/xennet_common.c	Tue Oct 14 10:45:56 2008 +1100
     2.3 @@ -76,7 +76,7 @@ XenNet_ParsePacketHeader(
     2.4    pi->ip4_length = GET_NET_PUSHORT(&pi->header[XN_HDR_SIZE + 2]);
     2.5    pi->tcp_header_length = (pi->header[XN_HDR_SIZE + pi->ip4_header_length + 12] & 0xf0) >> 2;
     2.6  
     2.7 -  if (header_length < (ULONG)(pi->ip4_header_length + pi->tcp_header_length))
     2.8 +  if (header_length < (ULONG)(pi->ip4_header_length + 20)) // pi->tcp_header_length))
     2.9    {
    2.10      KdPrint((__DRIVER_NAME "     first buffer is only %d bytes long, must be >= %d (2)\n", XN_HDR_SIZE + header_length, (ULONG)(XN_HDR_SIZE + pi->ip4_header_length + pi->tcp_header_length)));
    2.11      return PARSE_TOO_SMALL;
    2.12 @@ -214,6 +214,7 @@ XenFreelist_PutPage(freelist_t *fl, PMDL
    2.13  
    2.14    if (fl->page_free == PAGE_LIST_SIZE)
    2.15    {
    2.16 +    KdPrint((__DRIVER_NAME "     page free list full - releasing page\n"));
    2.17      /* our page list is full. free the buffer instead. This will be a bit sucky performancewise... */
    2.18      fl->xi->vectors.GntTbl_EndAccess(fl->xi->vectors.context,
    2.19        *(grant_ref_t *)(((UCHAR *)mdl) + MmSizeOfMdl(0, PAGE_SIZE)), FALSE);
     3.1 --- a/xennet/xennet_rx.c	Wed Sep 17 23:28:47 2008 +1000
     3.2 +++ b/xennet/xennet_rx.c	Tue Oct 14 10:45:56 2008 +1100
     3.3 @@ -105,7 +105,7 @@ put_packet_on_freelist(struct xennet_inf
     3.4  
     3.5    if (xi->rx_packet_free == NET_RX_RING_SIZE * 2)
     3.6    {
     3.7 -    //KdPrint((__DRIVER_NAME "     packet free list full - releasing packet\n"));
     3.8 +    KdPrint((__DRIVER_NAME "     packet free list full - releasing packet\n"));
     3.9      NdisFreePacket(packet);
    3.10      return;
    3.11    }
    3.12 @@ -185,7 +185,7 @@ XenNet_MakePacket(struct xennet_info *xi
    3.13        memcpy(&out_buffer[out_offset], in_buffer, length);
    3.14        out_remaining = out_remaining - length;
    3.15        out_offset = out_offset + length;
    3.16 -    } while (out_remaining != 0); // && in_buffer != NULL);
    3.17 +    } while (out_remaining != 0);
    3.18      NdisChainBufferAtBack(packet, out_mdl);
    3.19      XenNet_SumIpHeader(out_buffer, xi->rxpi.ip4_header_length);
    3.20      NDIS_SET_PACKET_STATUS(packet, NDIS_STATUS_SUCCESS);
    3.21 @@ -384,12 +384,10 @@ XenNet_MakePackets(
    3.22        if (xi->rxpi.tcp_remaining)
    3.23        {
    3.24          buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 13] &= ~8;
    3.25 -        KdPrint((__DRIVER_NAME "     Seq %d cleared PSH\n", GET_NET_PULONG(&buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 4])));
    3.26        }
    3.27        else
    3.28        {
    3.29          buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 13] |= 8;
    3.30 -        KdPrint((__DRIVER_NAME "     Seq %d set PSH\n", GET_NET_PULONG(&buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 4])));
    3.31        }
    3.32      }
    3.33      XenNet_SumPacketData(&xi->rxpi, packet);
     4.1 --- a/xenpci/evtchn.c	Wed Sep 17 23:28:47 2008 +1000
     4.2 +++ b/xenpci/evtchn.c	Tue Oct 14 10:45:56 2008 +1100
     4.3 @@ -24,8 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fi
     4.4    /* rest implemented in mingw_extras.c */
     4.5  #elif defined(_X86_)
     4.6    #define xchg(p1, p2) InterlockedExchange(p1, p2)
     4.7 -//  #define synch_clear_bit(p1, p2) _interlockedbittestandreset(p2, p1)
     4.8 -//  #define synch_set_bit(p1, p2) _interlockedbittestandset(p2, p1)
     4.9    #define synch_clear_bit(p1, p2) InterlockedBitTestAndReset(p2, p1)
    4.10    #define synch_set_bit(p1, p2) InterlockedBitTestAndSet(p2, p1)
    4.11    #define bit_scan_forward(p1, p2) _BitScanForward(p1, p2)
    4.12 @@ -66,24 +64,11 @@ EvtChn_AckEvent(PVOID context, evtchn_po
    4.13    ULONG evt_bit;
    4.14    xen_ulong_t val;
    4.15    
    4.16 -  shared_info_t *shared_info_area = xpdd->shared_info_area;
    4.17 -  int i;
    4.18 -
    4.19    evt_bit = port & (BITS_PER_LONG - 1);
    4.20    evt_word = port >> BITS_PER_LONG_SHIFT;
    4.21  
    4.22    val = synch_clear_bit(evt_bit, (volatile xen_long_t *)&xpdd->evtchn_pending_pvt[evt_word]);
    4.23    
    4.24 -  //KdPrint((__DRIVER_NAME "     port %d = %d\n", port, !!val));
    4.25 -
    4.26 -  for (i = 0; i < ARRAY_SIZE(shared_info_area->evtchn_pending); i++)
    4.27 -  {
    4.28 -    if (shared_info_area->evtchn_pending[i])
    4.29 -    {
    4.30 -      KdPrint((__DRIVER_NAME "     New event during IRQ processing - word = %d, val = %p\n", i, shared_info_area->evtchn_pending[i]));
    4.31 -    }
    4.32 -  }
    4.33 -
    4.34    return (BOOLEAN)!!val;
    4.35  }
    4.36