win-pvdrivers

changeset 388:81b5f730455b

IRQL related fixes for the restore path
author James Harper <james.harper@bendigoit.com.au>
date Fri Jul 11 20:41:07 2008 +1000 (2008-07-11)
parents 48df739c66d4
children 3ffdcb607981
files common.inc installer.nsi xenpci/memory.c xenpci/xenpci_fdo.c
line diff
     1.1 --- a/common.inc	Fri Jul 11 14:05:34 2008 +1000
     1.2 +++ b/common.inc	Fri Jul 11 20:41:07 2008 +1000
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.9.10.7
     1.5 +VERSION=0.9.10.8
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  MSC_WARNING_LEVEL=/W4
     1.8  INCLUDES = ..\common\include;..\common\include\public
     2.1 --- a/installer.nsi	Fri Jul 11 14:05:34 2008 +1000
     2.2 +++ b/installer.nsi	Fri Jul 11 20:41:07 2008 +1000
     2.3 @@ -3,7 +3,7 @@
     2.4  
     2.5  !define AppName "Xen PV Drivers"
     2.6  !define StartMenu "$SMPROGRAMS\${AppName}"
     2.7 -!define Version "0.9.11-pre6"
     2.8 +!define Version "0.9.11-pre7"
     2.9  #!define Version "$%VERSION%"
    2.10  Name "${AppName}"
    2.11  InstallDir "$PROGRAMFILES\${AppName}"
     3.1 --- a/xenpci/memory.c	Fri Jul 11 14:05:34 2008 +1000
     3.2 +++ b/xenpci/memory.c	Fri Jul 11 20:41:07 2008 +1000
     3.3 @@ -3,6 +3,8 @@
     3.4  //static pgentry_t *demand_map_pgt;
     3.5  //static void *demand_map_area_start;
     3.6  
     3.7 +/* must be called at <= DISPATCH_LEVEL if hypercall_stubs == NULL */
     3.8 +
     3.9  NTSTATUS
    3.10  hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd)
    3.11  {
    3.12 @@ -24,7 +26,11 @@ hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd)
    3.13    msr = cpuid_output[1];
    3.14    //KdPrint((__DRIVER_NAME " Hypercall area is %u pages.\n", pages));
    3.15  
    3.16 -  xpdd->hypercall_stubs = ExAllocatePoolWithTag(NonPagedPool, pages * PAGE_SIZE, XENPCI_POOL_TAG);
    3.17 +  if (!xpdd->hypercall_stubs)
    3.18 +  {
    3.19 +    ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
    3.20 +    xpdd->hypercall_stubs = ExAllocatePoolWithTag(NonPagedPool, pages * PAGE_SIZE, XENPCI_POOL_TAG);
    3.21 +  }
    3.22    KdPrint((__DRIVER_NAME " Hypercall area at %p\n", xpdd->hypercall_stubs));
    3.23  
    3.24    if (!xpdd->hypercall_stubs)
     4.1 --- a/xenpci/xenpci_fdo.c	Fri Jul 11 14:05:34 2008 +1000
     4.2 +++ b/xenpci/xenpci_fdo.c	Fri Jul 11 20:41:07 2008 +1000
     4.3 @@ -141,6 +141,8 @@ XenPci_Init(PXENPCI_DEVICE_DATA xpdd)
     4.4  
     4.5    if (!xpdd->shared_info_area_unmapped.QuadPart)
     4.6    {
     4.7 +    ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
     4.8 +    /* this should be safe as this part will never be called on resume where IRQL == HIGH_LEVEL */
     4.9      xpdd->shared_info_area_unmapped = XenPci_AllocMMIO(xpdd, PAGE_SIZE);
    4.10      xpdd->shared_info_area = MmMapIoSpace(xpdd->shared_info_area_unmapped,
    4.11        PAGE_SIZE, MmNonCached);