win-pvdrivers

changeset 172:4d23c0381767

Converted xenhide from a wdf driver to a wdm driver, to get around boot load order problems with the wdf libraries.
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 05 17:13:31 2008 +1100 (2008-02-05)
parents ae761953516e
children 3583c73e078f
files common.inc xenenum/xenenum.inx xenhide/makefile.inc xenhide/sources xenhide/xenhide.c xenhide/xenhide.h xenhide/xenhide.inx xenpci/xenpci.inx xenvbd/xenvbd.inx
line diff
     1.1 --- a/common.inc	Mon Feb 04 21:31:14 2008 +1100
     1.2 +++ b/common.inc	Tue Feb 05 17:13:31 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.6.5.2
     1.5 +VERSION=0.6.5.13
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/xenenum/xenenum.inx	Mon Feb 04 21:31:14 2008 +1100
     2.2 +++ b/xenenum/xenenum.inx	Tue Feb 05 17:13:31 2008 +1100
     2.3 @@ -36,7 +36,7 @@ DisplayName    = %XenEnum.SVCDESC%
     2.4  ServiceType    = 1
     2.5  StartType      = 0
     2.6  ErrorControl   = 1
     2.7 -LoadOrderGroup = WdfLoadGroup
     2.8 +LoadOrderGroup = System Bus Extender
     2.9  ServiceBinary  = %12%\xenenum.sys                            
    2.10  AddReg = XenEnum_Service_AddReg
    2.11  
     3.1 --- a/xenhide/makefile.inc	Mon Feb 04 21:31:14 2008 +1100
     3.2 +++ b/xenhide/makefile.inc	Tue Feb 05 17:13:31 2008 +1100
     3.3 @@ -1,5 +1,5 @@
     3.4  _LNG=$(LANGUAGE)
     3.5 -STAMP=stampinf -f $@ -a $(_BUILDARCH) -d * -k $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR) -v $(VERSION)
     3.6 +STAMP=stampinf -f $@ -a $(_BUILDARCH) -d * -v $(VERSION)
     3.7  
     3.8  ..\Target\$(DDK_TARGET_OS)\$(INF_NAME).inf: $(INF_NAME).inx sources ..\common.inc
     3.9      copy $(@B).inx $@
     4.1 --- a/xenhide/sources	Mon Feb 04 21:31:14 2008 +1100
     4.2 +++ b/xenhide/sources	Tue Feb 05 17:13:31 2008 +1100
     4.3 @@ -1,4 +1,6 @@
     4.4  !include "..\common.inc"
     4.5 +!UNDEF KMDF_VERSION
     4.6 +!UNDEF KMDF_VERSION_MAJOR
     4.7  TARGETNAME=xenhide
     4.8  TARGETTYPE=DRIVER
     4.9  INF_NAME=$(TARGETNAME)
     5.1 --- a/xenhide/xenhide.c	Mon Feb 04 21:31:14 2008 +1100
     5.2 +++ b/xenhide/xenhide.c	Tue Feb 05 17:13:31 2008 +1100
     5.3 @@ -22,9 +22,15 @@ Foundation, Inc., 51 Franklin Street, Fi
     5.4  
     5.5  DRIVER_INITIALIZE DriverEntry;
     5.6  static NTSTATUS
     5.7 -XenHide_AddDevice(WDFDRIVER Driver, PWDFDEVICE_INIT DeviceInit);
     5.8 -static VOID
     5.9 -XenHide_IoInternalDeviceControl(WDFQUEUE Queue, WDFREQUEST Request, size_t OutputBufferLength, size_t InputBufferLength, ULONG IoControlCode);
    5.10 +XenHide_AddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT PhysicalDeviceObject);
    5.11 +static NTSTATUS
    5.12 +XenHide_Pass(PDEVICE_OBJECT DeviceObject, PIRP Irp);
    5.13 +static NTSTATUS
    5.14 +XenHide_Pnp(PDEVICE_OBJECT DeviceObject, PIRP Irp);
    5.15 +static NTSTATUS
    5.16 +XenHide_AddDevice();
    5.17 +//static NTSTATUS
    5.18 +//XenHide_Unload();
    5.19  
    5.20  #ifdef ALLOC_PRAGMA
    5.21  #pragma alloc_text (INIT, DriverEntry)
    5.22 @@ -33,12 +39,9 @@ XenHide_IoInternalDeviceControl(WDFQUEUE
    5.23  
    5.24  static BOOLEAN AutoEnumerate;
    5.25  
    5.26 -static WDFDEVICE Device;
    5.27 -
    5.28  NTSTATUS
    5.29  DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
    5.30  {
    5.31 -  WDF_DRIVER_CONFIG config;
    5.32    NTSTATUS status;
    5.33    UNICODE_STRING RegKeyName;
    5.34    UNICODE_STRING RegValueName;
    5.35 @@ -135,17 +138,12 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
    5.36  
    5.37    KdPrint((__DRIVER_NAME "     AutoEnumerate = %d\n", AutoEnumerate));
    5.38  
    5.39 -  WDF_DRIVER_CONFIG_INIT(&config, XenHide_AddDevice);
    5.40 -  status = WdfDriverCreate(
    5.41 -                      DriverObject,
    5.42 -                      RegistryPath,
    5.43 -                      WDF_NO_OBJECT_ATTRIBUTES,
    5.44 -                      &config,
    5.45 -                      WDF_NO_HANDLE);
    5.46 -  if(!NT_SUCCESS(status))
    5.47 -  {
    5.48 -    KdPrint((__DRIVER_NAME " WdfDriverCreate failed with status 0x%08x\n", status));
    5.49 -  }
    5.50 +  for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
    5.51 +    DriverObject->MajorFunction[i] = XenHide_Pass;
    5.52 +  if (AutoEnumerate)
    5.53 +    DriverObject->MajorFunction[IRP_MJ_PNP] = XenHide_Pnp;
    5.54 +  DriverObject->DriverExtension->AddDevice = XenHide_AddDevice;
    5.55 +//  DriverObject->DriverUnload = XenHide_Unload;
    5.56  
    5.57    KdPrint((__DRIVER_NAME " <-- DriverEntry\n"));
    5.58  
    5.59 @@ -153,91 +151,67 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
    5.60  }
    5.61  
    5.62  static NTSTATUS
    5.63 -XenHide_PreprocessWdmIrpPNP(WDFDEVICE Device, PIRP Irp);
    5.64 -
    5.65 -static VOID 
    5.66 -XenPCI_IoDefault(
    5.67 -    IN WDFQUEUE  Queue,
    5.68 -    IN WDFREQUEST  Request
    5.69 -    )
    5.70 +XenHide_AddDevice(
    5.71 +  PDRIVER_OBJECT DriverObject,
    5.72 +  PDEVICE_OBJECT PhysicalDeviceObject
    5.73 +  )
    5.74  {
    5.75 -  UNREFERENCED_PARAMETER(Queue);
    5.76 -
    5.77 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    5.78 -
    5.79 -  WdfRequestComplete(Request, STATUS_NOT_IMPLEMENTED);
    5.80 -
    5.81 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    5.82 -}
    5.83 -
    5.84 -static VOID 
    5.85 -XenPCI_IoRead(WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
    5.86 -{
    5.87 -  PCHAR Buffer;
    5.88 -  size_t BufLen;
    5.89 -
    5.90 -  UNREFERENCED_PARAMETER(Queue);
    5.91 -  UNREFERENCED_PARAMETER(Length);
    5.92 +  NTSTATUS status;
    5.93 +  PDEVICE_OBJECT deviceObject = NULL;
    5.94 +  PDEVICE_EXTENSION DeviceExtension;
    5.95  
    5.96    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    5.97  
    5.98 -  WdfRequestRetrieveOutputBuffer(Request, 1, &Buffer, &BufLen);
    5.99 -
   5.100 -  ASSERT(BufLen > 0);
   5.101 -
   5.102 -  Buffer[0] = 1;
   5.103 -
   5.104 -  WdfRequestCompleteWithInformation(Request, STATUS_SUCCESS, 1);
   5.105 -
   5.106 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   5.107 -}
   5.108 -
   5.109 -static NTSTATUS
   5.110 -XenHide_AddDevice(
   5.111 -    IN WDFDRIVER Driver,
   5.112 -    IN PWDFDEVICE_INIT DeviceInit
   5.113 -    )
   5.114 -{
   5.115 -  NTSTATUS status;
   5.116 -  WDF_OBJECT_ATTRIBUTES attributes;
   5.117 -  UCHAR MinorFunctions[3] = { IRP_MN_QUERY_DEVICE_RELATIONS };
   5.118 +  status = IoCreateDevice (DriverObject,
   5.119 +    sizeof(DEVICE_EXTENSION),
   5.120 +    NULL,
   5.121 +    FILE_DEVICE_UNKNOWN,
   5.122 +    FILE_DEVICE_SECURE_OPEN,
   5.123 +    FALSE,
   5.124 +    &deviceObject);
   5.125  
   5.126 -  UNREFERENCED_PARAMETER(Driver);
   5.127 -
   5.128 -  KdPrint((__DRIVER_NAME " --> DeviceAdd\n"));
   5.129 -  KdPrint((__DRIVER_NAME "     IRQL = %d\n", KeGetCurrentIrql()));
   5.130 -
   5.131 -  WdfFdoInitSetFilter(DeviceInit);
   5.132 +  DeviceExtension = (PDEVICE_EXTENSION)deviceObject->DeviceExtension;
   5.133  
   5.134 -  status = WdfDeviceInitAssignWdmIrpPreprocessCallback(DeviceInit, XenHide_PreprocessWdmIrpPNP, IRP_MJ_PNP, MinorFunctions, 3);
   5.135 -  if(!NT_SUCCESS(status))
   5.136 -  {
   5.137 -    KdPrint((__DRIVER_NAME "     WdfDeviceInitAssignWdmIrpPreprocessCallback failed with status 0x%08x\n", status));
   5.138 -    return status;
   5.139 -  }
   5.140 +  DeviceExtension->NextLowerDevice = IoAttachDeviceToDeviceStack(
   5.141 +    deviceObject,
   5.142 +    PhysicalDeviceObject);
   5.143 +  deviceObject->Flags |= DeviceExtension->NextLowerDevice->Flags;
   5.144  
   5.145 -  WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
   5.146 +  deviceObject->DeviceType = DeviceExtension->NextLowerDevice->DeviceType;
   5.147  
   5.148 -  status = WdfDeviceCreate(&DeviceInit, &attributes, &Device);  
   5.149 -  if(!NT_SUCCESS(status))
   5.150 -  {
   5.151 -    KdPrint((__DRIVER_NAME "     WdfDeviceCreate failed with status 0x%08x\n", status));
   5.152 -    return status;
   5.153 -  }
   5.154 +  deviceObject->Characteristics = 
   5.155 +    DeviceExtension->NextLowerDevice->Characteristics;
   5.156 +
   5.157 +  DeviceExtension->Self = deviceObject;
   5.158 +
   5.159 +  //INITIALIZE_PNP_STATE(DeviceExtension);
   5.160  
   5.161    if (AutoEnumerate)
   5.162    {
   5.163 -    status = WdfDeviceCreateDeviceInterface(Device, (LPGUID)&GUID_XENHIDE_IFACE, NULL);
   5.164 +    status = IoRegisterDeviceInterface(PhysicalDeviceObject, (LPGUID)&GUID_XENHIDE_IFACE, NULL, &DeviceExtension->InterfaceName);
   5.165      if (!NT_SUCCESS(status))
   5.166      {
   5.167 -      KdPrint((__DRIVER_NAME "     WdfDeviceCreateDeviceInterface failed 0x%08x\n", status));
   5.168 +      KdPrint((__DRIVER_NAME "     IoRegisterDeviceInterface failed 0x%08x\n", status));
   5.169 +      return status;
   5.170 +    }
   5.171 +    KdPrint((__DRIVER_NAME "     IoRegisterDeviceInterface complete, SymbolicLinkName = %wZ\n", &DeviceExtension->InterfaceName));
   5.172 +    status = IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, TRUE);
   5.173 +    if (!NT_SUCCESS(status))
   5.174 +    {
   5.175 +      KdPrint((__DRIVER_NAME "     IoSetDeviceInterfaceState failed 0x%08x\n", status));
   5.176        return status;
   5.177      }
   5.178    }
   5.179 +  else
   5.180 +  {
   5.181 +    KdPrint((__DRIVER_NAME "     Not registering Interface\n"));
   5.182 +  }
   5.183  
   5.184 -  KdPrint((__DRIVER_NAME " <-- DeviceAdd\n"));
   5.185 +  deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
   5.186  
   5.187 -  return status;
   5.188 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   5.189 +
   5.190 +  return STATUS_SUCCESS;
   5.191  }
   5.192  
   5.193  static int
   5.194 @@ -315,10 +289,23 @@ XenHide_IoCompletion(PDEVICE_OBJECT Devi
   5.195  }
   5.196  
   5.197  static NTSTATUS
   5.198 -XenHide_PreprocessWdmIrpPNP(WDFDEVICE Device, PIRP Irp)
   5.199 +XenHide_Pass(PDEVICE_OBJECT DeviceObject, PIRP Irp)
   5.200 +{
   5.201 +  PDEVICE_EXTENSION DeviceExtension;
   5.202 +  NTSTATUS status;
   5.203 +    
   5.204 +  DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
   5.205 +  IoSkipCurrentIrpStackLocation(Irp);
   5.206 +  status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
   5.207 +  return status;
   5.208 +}
   5.209 +
   5.210 +static NTSTATUS
   5.211 +XenHide_Pnp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
   5.212  {
   5.213    NTSTATUS Status = STATUS_SUCCESS;
   5.214    PIO_STACK_LOCATION Stack;
   5.215 +  PDEVICE_EXTENSION DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
   5.216  
   5.217    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   5.218    KdPrint((__DRIVER_NAME "     IRQL = %d\n", KeGetCurrentIrql()));
   5.219 @@ -327,7 +314,7 @@ XenHide_PreprocessWdmIrpPNP(WDFDEVICE De
   5.220  
   5.221    switch (Stack->MinorFunction) {
   5.222    case IRP_MN_QUERY_DEVICE_RELATIONS:
   5.223 -    KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_DEVICE_RELATIONS Device = %08x Irp = %08x, Stack = %08x\n", Device, Irp, Stack));
   5.224 +    KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_DEVICE_RELATIONS\n"));
   5.225      switch (Stack->Parameters.QueryDeviceRelations.Type)
   5.226      {
   5.227      case BusRelations:
   5.228 @@ -336,61 +323,23 @@ XenHide_PreprocessWdmIrpPNP(WDFDEVICE De
   5.229        {
   5.230          IoCopyCurrentIrpStackLocationToNext(Irp);
   5.231          IoSetCompletionRoutine(Irp, XenHide_IoCompletion, NULL, TRUE, TRUE, TRUE);
   5.232 -        Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.233 +        Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
   5.234        }
   5.235        else
   5.236        {
   5.237          IoSkipCurrentIrpStackLocation(Irp);
   5.238 -        Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.239 +        Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
   5.240        }
   5.241        break;  
   5.242 -    case EjectionRelations: 
   5.243 -      IoSkipCurrentIrpStackLocation(Irp);
   5.244 -      Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.245 -      KdPrint((__DRIVER_NAME "       EjectionRelations\n"));
   5.246 -      break;  
   5.247 -    case RemovalRelations:
   5.248 -      IoSkipCurrentIrpStackLocation(Irp);
   5.249 -      Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.250 -      KdPrint((__DRIVER_NAME "       RemovalRelations\n"));
   5.251 -      break;  
   5.252 -    case TargetDeviceRelation:
   5.253 -      IoSkipCurrentIrpStackLocation(Irp);
   5.254 -      Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.255 -      KdPrint((__DRIVER_NAME "       TargetDeviceRelation\n"));
   5.256 -      break;  
   5.257      default:
   5.258        IoSkipCurrentIrpStackLocation(Irp);
   5.259 -      Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.260 -      KdPrint((__DRIVER_NAME "     Unknown Type %d\n", Stack->Parameters.QueryDeviceRelations.Type));
   5.261 +      Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
   5.262        break;  
   5.263      }
   5.264      break;
   5.265 -  case IRP_MN_QUERY_INTERFACE:
   5.266 -    KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_INTERFACE\n"));
   5.267 -    if (memcmp(Stack->Parameters.QueryInterface.InterfaceType, &GUID_XENHIDE_IFACE, sizeof(GUID)) == 0)
   5.268 -    {
   5.269 -      KdPrint((__DRIVER_NAME "     Interface == GUID_XENHIDE_IFACE\n"));
   5.270 -    }
   5.271 -    IoSkipCurrentIrpStackLocation(Irp);
   5.272 -    Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.273 -    break;
   5.274 -  case IRP_MN_QUERY_BUS_INFORMATION:
   5.275 -    KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_BUS_INFORMATION\n"));
   5.276 -    IoSkipCurrentIrpStackLocation(Irp);
   5.277 -    Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.278 -    break;
   5.279 -/*
   5.280 -  case IRP_MN_START_DEVICE:
   5.281 -    KdPrint((__DRIVER_NAME "     IRP_MN_START_DEVICE\n"));
   5.282 -    IoSkipCurrentIrpStackLocation(Irp);
   5.283 -    Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.284 -    break;
   5.285 -*/
   5.286    default:
   5.287      IoSkipCurrentIrpStackLocation(Irp);
   5.288 -    Status = WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp);
   5.289 -    KdPrint((__DRIVER_NAME "     Unknown Minor %d\n", Stack->MinorFunction));
   5.290 +    Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
   5.291      break;
   5.292    }
   5.293  
     6.1 --- a/xenhide/xenhide.h	Mon Feb 04 21:31:14 2008 +1100
     6.2 +++ b/xenhide/xenhide.h	Tue Feb 05 17:13:31 2008 +1100
     6.3 @@ -20,12 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fi
     6.4  #if !defined(_XENHIDE_H_)
     6.5  #define _XENHIDE_H_
     6.6  
     6.7 -#define __attribute__(arg) /* empty */
     6.8 -#define EISCONN 127
     6.9 -
    6.10  #include <ntddk.h>
    6.11  #include <wdm.h>
    6.12 -#include <wdf.h>
    6.13  #include <initguid.h>
    6.14  #include <wdmguid.h>
    6.15  #include <errno.h>
    6.16 @@ -35,68 +31,13 @@ Foundation, Inc., 51 Franklin Street, Fi
    6.17  
    6.18  #define __DRIVER_NAME "XenHide"
    6.19  
    6.20 -#include <xen_windows.h>
    6.21 -
    6.22 -#include <memory.h>
    6.23 -#include <grant_table.h>
    6.24 -#include <event_channel.h>
    6.25 -#include <hvm/params.h>
    6.26 -#include <hvm/hvm_op.h>
    6.27 -
    6.28 -#include <xen_public.h>
    6.29 -
    6.30 -//{C828ABE9-14CA-4445-BAA6-82C2376C6518}
    6.31 -//DEFINE_GUID( GUID_XENPCI_DEVCLASS, 0xC828ABE9, 0x14CA, 0x4445, 0xBA, 0xA6, 0x82, 0xC2, 0x37, 0x6C, 0x65, 0x18);
    6.32 -
    6.33 -#define XENHIDE_POOL_TAG (ULONG) 'XenH'
    6.34 -//#define XENHIDE_FDO_INSTANCE_SIGNATURE (ULONG) 'XENP'
    6.35 -
    6.36 -#define NR_RESERVED_ENTRIES 8
    6.37 -#define NR_GRANT_FRAMES 4
    6.38 -#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
    6.39 -
    6.40 -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
    6.41 -
    6.42 -extern char *hypercall_stubs;
    6.43 +//{CD433FE7-954F-4D51-BE29-D8A38DFA1108}
    6.44 +DEFINE_GUID(GUID_XENHIDE_IFACE, 0xCD433FE7, 0x954F, 0x4D51, 0xBE, 0x29, 0xD8, 0xA3, 0x8D, 0xFA, 0x11, 0x08);
    6.45  
    6.46 -typedef struct _XENHIDE_IDENTIFICATION_DESCRIPTION
    6.47 -{
    6.48 -  WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header;
    6.49 -  UNICODE_STRING DeviceType;
    6.50 -//  ULONG DeviceIndex;
    6.51 -  char Path[128];
    6.52 -} XENHIDE_IDENTIFICATION_DESCRIPTION, *PXENHIDE_IDENTIFICATION_DESCRIPTION;
    6.53 -
    6.54 -
    6.55 -typedef struct {
    6.56 -  WDFQUEUE          IoDefaultQueue;
    6.57 -
    6.58 -  // Resources
    6.59 -  //WDFINTERRUPT      Interrupt;
    6.60 -  //PULONG            PhysAddress;
    6.61 -
    6.62 -  //ULONG platform_mmio_addr;
    6.63 -  //ULONG platform_mmio_len;
    6.64 -  //ULONG platform_mmio_alloc;
    6.65 -
    6.66 -  //ULONG shared_info_frame;
    6.67 -  //char *hypercall_stubs;
    6.68 -
    6.69 -  //PULONG            IoBaseAddress;
    6.70 -  //ULONG             IoRange;
    6.71 -
    6.72 -  // Grant Table stuff
    6.73 -
    6.74 -  //grant_entry_t *gnttab_table;
    6.75 -  //grant_ref_t gnttab_list[NR_GRANT_ENTRIES];
    6.76 -
    6.77 -} XENHIDE_DEVICE_DATA, *PXENHIDE_DEVICE_DATA;
    6.78 -
    6.79 -WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENHIDE_DEVICE_DATA, GetDeviceData);
    6.80 -
    6.81 -typedef unsigned long xenbus_transaction_t;
    6.82 -typedef uint32_t XENSTORE_RING_IDX;
    6.83 -
    6.84 -#define XBT_NIL ((xenbus_transaction_t)0)
    6.85 +struct _DEVICE_EXTENSION {
    6.86 +  PDEVICE_OBJECT Self;
    6.87 +  PDEVICE_OBJECT NextLowerDevice;
    6.88 +  UNICODE_STRING InterfaceName;
    6.89 +} typedef DEVICE_EXTENSION, *PDEVICE_EXTENSION;
    6.90  
    6.91  #endif
     7.1 --- a/xenhide/xenhide.inx	Mon Feb 04 21:31:14 2008 +1100
     7.2 +++ b/xenhide/xenhide.inx	Tue Feb 05 17:13:31 2008 +1100
     7.3 @@ -3,14 +3,12 @@ Signature="$WINDOWS NT$"
     7.4  Class=System
     7.5  ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
     7.6  Provider=%JAMESHARPER%
     7.7 -DriverVer=11/20/2007,0.4.0.0
     7.8  
     7.9  [ControlFlags]
    7.10  ExcludeFromSelect = *
    7.11  
    7.12  [DestinationDirs]
    7.13  DefaultDestDir = 12
    7.14 -CoInstaller_CopyFiles = 11
    7.15  
    7.16  [Manufacturer]
    7.17  %JAMESHARPER%=JAMESHARPER,NTx86
    7.18 @@ -38,14 +36,12 @@ Needs=PCI_DRV_ROOT.HW
    7.19  
    7.20  [XenHide_Inst_HW_AddReg]
    7.21  HKR,,"LowerFilters",0x00010000,"XenHide"
    7.22 -HKLM,SYSTEM\CurrentControlSet\Services\Wdf01000,Group,0x00000000,Boot Bus Extender
    7.23  
    7.24  [XenHide.CopyFiles]
    7.25  xenhide.sys
    7.26  
    7.27  [SourceDisksFiles]
    7.28  xenhide.sys=1
    7.29 -WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll=1,,
    7.30  
    7.31  [SourceDisksNames.x86]
    7.32  1 = %DISK_NAME%,,,\i386
    7.33 @@ -65,23 +61,12 @@ ServiceType    = 1
    7.34  StartType      = 0
    7.35  ErrorControl   = 1
    7.36  ServiceBinary  = %12%\xenhide.sys                          
    7.37 +LoadOrderGroup = Boot Bus Extender
    7.38  
    7.39  [XenHide_Inst.NT.CoInstallers]
    7.40  AddReg=CoInstaller_AddReg
    7.41  CopyFiles=CoInstaller_CopyFiles
    7.42  
    7.43 -[CoInstaller_CopyFiles]
    7.44 -WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll,,,2
    7.45 -
    7.46 -[CoInstaller_AddReg]
    7.47 -HKR,,CoInstallers32,0x00010000, "WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
    7.48 -
    7.49 -[XenHide_Inst.NT.Wdf]
    7.50 -KmdfService = xenhide, XenHide_WDFSect
    7.51 -
    7.52 -[XenHide_WDFSect]
    7.53 -KmdfLibraryVersion = $KMDFVERSION$
    7.54 -
    7.55  [Strings]
    7.56  JAMESHARPER = "James Harper"
    7.57  XenHide.SVCDESC = "Xen PCI Device Hider Driver"
     8.1 --- a/xenpci/xenpci.inx	Mon Feb 04 21:31:14 2008 +1100
     8.2 +++ b/xenpci/xenpci.inx	Tue Feb 05 17:13:31 2008 +1100
     8.3 @@ -46,7 +46,7 @@ DisplayName    = %XenPCI.SVCDESC%
     8.4  ServiceType    = 1
     8.5  StartType      = 0
     8.6  ErrorControl   = 1
     8.7 -LoadOrderGroup = WdfLoadGroup
     8.8 +LoadOrderGroup = System Bus Extender
     8.9  ServiceBinary  = %12%\xenpci.sys                            
    8.10  
    8.11  [XenPCI_Inst.NT.CoInstallers]
     9.1 --- a/xenvbd/xenvbd.inx	Mon Feb 04 21:31:14 2008 +1100
     9.2 +++ b/xenvbd/xenvbd.inx	Tue Feb 05 17:13:31 2008 +1100
     9.3 @@ -38,7 +38,7 @@ DisplayName    = %XenVbd.SVCDESC%
     9.4  ServiceType    = 1
     9.5  StartType      = 0
     9.6  ErrorControl   = 1
     9.7 -LoadOrderGroup = WdfLoadGroup
     9.8 +LoadOrderGroup = System Bus Extender
     9.9  ServiceBinary  = %12%\xenvbd.sys                            
    9.10  AddReg = XenVbd_Service_AddReg
    9.11  
    9.12 @@ -85,7 +85,7 @@ DisplayName    = "Xen Resource Adder"
    9.13  ServiceType    = 1
    9.14  StartType      = 0
    9.15  ErrorControl   = 1
    9.16 -LoadOrderGroup = WdfLoadGroup
    9.17 +LoadOrderGroup = System Bus Extender
    9.18  ServiceBinary  = %12%\xenaddresource.sys
    9.19  AddReg = XenAddResource_Service_AddReg
    9.20