win-pvdrivers

changeset 210:39a97a06e5cd 0.8.5

Final updates for 0.8.5
author James Harper <james.harper@bendigoit.com.au>
date Thu Mar 13 20:57:27 2008 +1100 (2008-03-13)
parents 45fdf0d55f31
children 8c5a5b5bc5f0
files common.inc xennet/xennet.h xennet/xennet_oid.c xennet/xennet_rx.c xenpci/hypercall_amd64.h
line diff
     1.1 --- a/common.inc	Wed Mar 12 22:44:47 2008 +1100
     1.2 +++ b/common.inc	Thu Mar 13 20:57:27 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.8.4.148
     1.5 +VERSION=0.8.5.0
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/xennet/xennet.h	Wed Mar 12 22:44:47 2008 +1100
     2.2 +++ b/xennet/xennet.h	Thu Mar 13 20:57:27 2008 +1100
     2.3 @@ -77,7 +77,6 @@ Foundation, Inc., 51 Franklin Street, Fi
     2.4  #define MIN_LARGE_SEND_SEGMENTS 4
     2.5  #define MAX_LARGE_SEND_OFFLOAD 65535
     2.6  
     2.7 -
     2.8  /* TODO: crank this up if we support higher mtus? */
     2.9  #define XN_DATA_SIZE 1500
    2.10  #define XN_HDR_SIZE 14
     3.1 --- a/xennet/xennet_oid.c	Wed Mar 12 22:44:47 2008 +1100
     3.2 +++ b/xennet/xennet_oid.c	Thu Mar 13 20:57:27 2008 +1100
     3.3 @@ -150,7 +150,7 @@ XenNet_QueryInformation(
     3.4        break;
     3.5      case OID_GEN_CURRENT_LOOKAHEAD:
     3.6        // TODO: we should store this...
     3.7 -      temp_data = XN_MAX_PKT_SIZE;
     3.8 +      temp_data = 54; //XN_MAX_PKT_SIZE;
     3.9        break;
    3.10      case OID_GEN_DRIVER_VERSION:
    3.11        temp_data = (NDIS_MINIPORT_MAJOR_VERSION << 8) | NDIS_MINIPORT_MINOR_VERSION;
     4.1 --- a/xennet/xennet_rx.c	Wed Mar 12 22:44:47 2008 +1100
     4.2 +++ b/xennet/xennet_rx.c	Thu Mar 13 20:57:27 2008 +1100
     4.3 @@ -200,19 +200,19 @@ XenNet_RxBufferCheck(struct xennet_info 
     4.4        xi->rx_id_free++;
     4.5        if (xi->rx_extra_info)
     4.6        {
     4.7 -KdPrint((__DRIVER_NAME "     RX extra info detected\n"));
     4.8 +//KdPrint((__DRIVER_NAME "     RX extra info detected\n"));
     4.9          put_page_on_freelist(xi, mdl);
    4.10          ei = (struct netif_extra_info *)RING_GET_RESPONSE(&xi->rx, cons);
    4.11          xi->rx_extra_info = ei->flags & XEN_NETIF_EXTRA_FLAG_MORE;
    4.12          switch (ei->type)
    4.13          {
    4.14          case XEN_NETIF_EXTRA_TYPE_GSO:
    4.15 -KdPrint((__DRIVER_NAME "     GSO detected - size = %d\n", ei->u.gso.size));
    4.16 +//KdPrint((__DRIVER_NAME "     GSO detected - size = %d\n", ei->u.gso.size));
    4.17            switch (ei->u.gso.type)
    4.18            {
    4.19            case XEN_NETIF_GSO_TYPE_TCPV4:
    4.20 -KdPrint((__DRIVER_NAME "     GSO_TYPE_TCPV4 detected\n"));
    4.21 -            NDIS_PER_PACKET_INFO_FROM_PACKET(packets[packet_count], TcpLargeSendPacketInfo) = (PVOID)(xen_ulong_t)(ei->u.gso.size);
    4.22 +//KdPrint((__DRIVER_NAME "     GSO_TYPE_TCPV4 detected\n"));
    4.23 +//            NDIS_PER_PACKET_INFO_FROM_PACKET(packets[packet_count], TcpLargeSendPacketInfo) = (PVOID)(xen_ulong_t)(ei->u.gso.size);
    4.24              break;
    4.25            default:
    4.26              KdPrint((__DRIVER_NAME "     Unknown GSO type (%d) detected\n", ei->u.gso.type));
    4.27 @@ -220,7 +220,7 @@ KdPrint((__DRIVER_NAME "     GSO_TYPE_TC
    4.28            }
    4.29            break;
    4.30          default:
    4.31 -KdPrint((__DRIVER_NAME "     Unknown extra info type (%d) detected\n", ei->type));
    4.32 +          KdPrint((__DRIVER_NAME "     Unknown extra info type (%d) detected\n", ei->type));
    4.33            break;
    4.34          }
    4.35        }
    4.36 @@ -253,6 +253,7 @@ KdPrint((__DRIVER_NAME "     Unknown ext
    4.37              ProfCount_RxPacketsCsumOffload++;
    4.38  #endif
    4.39            }
    4.40 +          // we also need to manually split gso packets that we receive that originated on our side of the physical interface...
    4.41          }
    4.42          else
    4.43          {
     5.1 --- a/xenpci/hypercall_amd64.h	Wed Mar 12 22:44:47 2008 +1100
     5.2 +++ b/xenpci/hypercall_amd64.h	Thu Mar 13 20:57:27 2008 +1100
     5.3 @@ -118,6 +118,33 @@ HYPERVISOR_event_channel_op(WDFDEVICE De
     5.4    return _hypercall2(event_channel_op_func, cmd, op);
     5.5  }
     5.6  
     5.7 +static __inline int
     5.8 +HYPERVISOR_sched_op(WDFDEVICE Device, int cmd, void *arg)
     5.9 +{
    5.10 +  PCHAR sched_op_func = GetDeviceData(Device)->hypercall_stubs;
    5.11 +  sched_op_func += __HYPERVISOR_sched_op * 32;
    5.12 +  return _hypercall2(sched_op_func, cmd, arg);
    5.13 +}
    5.14 +
    5.15 +static __inline int
    5.16 +HYPERVISOR_shutdown(WDFDEVICE Device, unsigned int reason)
    5.17 +{
    5.18 +  struct sched_shutdown ss;
    5.19 +  int retval;
    5.20 +
    5.21 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    5.22 +
    5.23 +  ss.reason = reason;
    5.24 +
    5.25 +  KdPrint((__DRIVER_NAME "     A\n"));
    5.26 +
    5.27 +  retval = HYPERVISOR_sched_op(Device, SCHEDOP_shutdown, &ss);
    5.28 +
    5.29 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    5.30 +
    5.31 +  return retval;
    5.32 +}
    5.33 +
    5.34  static __inline ULONGLONG
    5.35  hvm_get_parameter(WDFDEVICE Device, int hvm_param)
    5.36  {