I would like my driver to be notified whenever a driver is loaded
(ideally as soon as its DriverEntry is complete), eg something like
IoRegisterPlugPlayNotification, but for a driver rather than a
DeviceInterface.
My ultimate goal is to entirely prevent certain drivers from loading at
all. Under Xen, qemu provides an emulated IDE device, and I have written
Xen drivers to use the PV channel which is much faster - but Windows
thinks the qemu IDE device any my PV device are different underlying
devices, and completely wrecks them when it tries to mount them as such
(replaying or truncating logs on one while the other is mounted etc).
Currently I am solving this by loading various filters which fail the
startdevice on the IDE controller when the PV driver is running (when a
boot.ini entry with /GPLPV is selected), or remove the IDE device from
the PCI enumeration. All of these methods seem a bit dirty, and are a
little awkward.
While it would be simple enough just to remove the IDE driver from the
system entirely once the PV drivers are installed, I want to be able to
select between the drivers at boot time, so I only want them disabled
when the /GPLPV boot.ini entry is selected.
The main sticking point is that this absolutely has to be bulletproof.
If something goes wrong and windows manages to mount both ‘copies’ of
the data, it completely destroys the volume.
All suggestions appreciated!
Thanks
James