win-pvdrivers

changeset 92:7bcdf94713dc

Detected current cpu instead of just assuming zero in ISR. Still crashes when vcpus > 1 though
author James Harper <james.harper@bendigoit.com.au>
date Thu Jan 03 16:59:51 2008 +1100 (2008-01-03)
parents 24963c2b7846
children 2a2f98373c9a
files xennet/sources xenpci/evtchn.c xenpci/sources
line diff
     1.1 --- a/xennet/sources	Wed Jan 02 16:52:52 2008 -0800
     1.2 +++ b/xennet/sources	Thu Jan 03 16:59:51 2008 +1100
     1.3 @@ -1,7 +1,7 @@
     1.4  TARGETNAME=XENNET
     1.5  TARGETTYPE=DRIVER
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7 -VERSION=0.5.0.37
     1.8 +VERSION=0.5.0.39
     1.9  KMDF_VERSION=1
    1.10  MSC_WARNING_LEVEL=/W4
    1.11  INF_NAME=xennet
     2.1 --- a/xenpci/evtchn.c	Wed Jan 02 16:52:52 2008 -0800
     2.2 +++ b/xenpci/evtchn.c	Thu Jan 03 16:59:51 2008 +1100
     2.3 @@ -27,13 +27,12 @@ EvtChn_DpcBounce(WDFDPC Dpc)
     2.4  
     2.5    Action = GetEvtChnDeviceData(Dpc)->Action;
     2.6    Action->ServiceRoutine(NULL, Action->ServiceContext);
     2.7 -//  _interlockedbittestandreset((volatile LONG *)&GetEvtChnDeviceData(Dpc)->shared_info_area->evtchn_pending[0], GetEvtChnDeviceData(Dpc)->port);
     2.8  }
     2.9  
    2.10  BOOLEAN
    2.11  EvtChn_Interrupt(WDFINTERRUPT Interrupt, ULONG MessageID)
    2.12  {
    2.13 -  int cpu = 0;
    2.14 +  int cpu = KeGetCurrentProcessorNumber();
    2.15    vcpu_info_t *vcpu_info;
    2.16    PXENPCI_DEVICE_DATA xpdd = GetDeviceData(WdfInterruptGetDevice(Interrupt));
    2.17    shared_info_t *shared_info_area = xpdd->shared_info_area;
    2.18 @@ -280,8 +279,12 @@ EvtChn_Init(WDFDEVICE Device)
    2.19    {
    2.20      xpdd->shared_info_area->evtchn_pending[i] = 0;
    2.21    }
    2.22 -  xpdd->shared_info_area->vcpu_info[0].evtchn_upcall_pending = 0;
    2.23 -  xpdd->shared_info_area->vcpu_info[0].evtchn_pending_sel = 0;
    2.24 +
    2.25 +  for (i = 0; i < MAX_VIRT_CPUS; i++)
    2.26 +  {
    2.27 +    xpdd->shared_info_area->vcpu_info[i].evtchn_upcall_pending = 0;
    2.28 +    xpdd->shared_info_area->vcpu_info[i].evtchn_pending_sel = 0;
    2.29 +  }
    2.30  
    2.31    return STATUS_SUCCESS;
    2.32  }
     3.1 --- a/xenpci/sources	Wed Jan 02 16:52:52 2008 -0800
     3.2 +++ b/xenpci/sources	Thu Jan 03 16:59:51 2008 +1100
     3.3 @@ -1,7 +1,7 @@
     3.4  TARGETNAME=XENPCI
     3.5  TARGETTYPE=DRIVER
     3.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     3.7 -VERSION=0.5.0.11
     3.8 +VERSION=0.5.0.14
     3.9  KMDF_VERSION=1
    3.10  MSC_WARNING_LEVEL=/W4
    3.11  INF_NAME=xenpci