win-pvdrivers

changeset 3:0cd078f41eed

Added some documentation files
author James Harper <james.harper@bendigoit.com.au>
date Sun Nov 11 16:07:56 2007 +1100 (2007-11-11)
parents d47d595b0b19
children 3bf1f48005d8
files BUILDING.txt INSTALLING.txt README.txt TODO.txt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/BUILDING.txt	Sun Nov 11 16:07:56 2007 +1100
     1.3 @@ -0,0 +1,15 @@
     1.4 +1. Download and install the Windows Driver Framework SDK (6000, not 6001 which is Longhorn only) from Microsoft. You have to jump through a few hoops to get it, but it is free (as in beer of course. Microsoft don't do the 'as in speech' variety of free). It's also huge. http://www.microsoft.com/whdc/driver/wdf/default.mspx is a good place to start.
     1.5 +
     1.6 +2. Start the WDF Build Environment that best suits your needs. I've only ever used 2003 32 Bit Checked.
     1.7 +
     1.8 +3. Use Mercurial (get it from http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages) to get the latest sources from http://xenbits.xensource.com/ext/win-pvdrivers.hg.
     1.9 +
    1.10 +4. Copy the whole xen/include/public folder and put it in common/include/public in the Windows PV drivers tree.
    1.11 +
    1.12 +5. Go into each of xenpci, xenvbd, and xenhide and do a 'build'.
    1.13 +
    1.14 +6. Assuming all went well, your drivers should be in the target subfolder of each of those directories.
    1.15 +
    1.16 +I've probably omitted some vitally important step from the above, so please let me know if you need any assistance compiling.
    1.17 +
    1.18 +See the INSTALLING.txt file for information on how to install.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/INSTALLING.txt	Sun Nov 11 16:07:56 2007 +1100
     2.3 @@ -0,0 +1,71 @@
     2.4 +Please follow the steps here exactly. If you don't, you may be left with an unbootable machine (although 'Last known good configuration' should make it bootable again).
     2.5 +
     2.6 +1. Copy the driver files that you built by following the BUILDING.txt steps, so that on your testing machine the tree looks like this:
     2.7 +
     2.8 +Xen\xenhide.inf
     2.9 +Xen\xenpci.inf
    2.10 +Xen\xenvbd.inf
    2.11 +Xen\i386\xenhide.sys
    2.12 +Xen\i386\xenpci.sys
    2.13 +Xen\i386\xenvbd.sys
    2.14 +Xen\i386\WdfCoInstaller01005.dll
    2.15 +(you'll need to copy WdfCoInstaller01005.dll from the redist folder in the DDK)
    2.16 +
    2.17 +2. Go to the device manager (Right click on My Computer, then select the Hardware tab, then click Device Manager)
    2.18 +
    2.19 +3. Find the 'PCI Device' under 'Other Devices' - it should have an exclamation mark against it. Right click on it and select 'Update Driver...'
    2.20 +
    2.21 +4. Select 'No, not this time' in answer to 'Can Windows connect to Windows Update...' and click Next
    2.22 +
    2.23 +5. Select 'Install from a list of specific location (Advanced)' and click Next
    2.24 +
    2.25 +6. Untick 'Search removable media...' and tick 'Include this location...'. Enter the name of the directory where you put the .inf files, then click Next
    2.26 +
    2.27 +7. Windows should find the XenPCI driver as a candidate, and will complain that it hasn't been signed. Just accept the warning.
    2.28 +
    2.29 +8. Windows should load the XenPCI driver, and then give you 4 more 'Other Devices' - console, vfb, vif, and vbd.
    2.30 +
    2.31 +9. Repeat steps 3-7 for the vbd device. Windows should then load the XenVBD driver.
    2.32 +
    2.33 +10. The next bit is a bit tricker. In Device Manager, drill down on System devices and right click on PCI Bus and select Update Driver.
    2.34 +
    2.35 +11. Select 'No, not this time' in answer to 'Can Windows connect to Windows Update...' and click Next
    2.36 +
    2.37 +12. Select 'Install from a list or specific location (Advanced)' and click Next
    2.38 +
    2.39 +13. This time, select 'Don't search. I will choose the driver to install' and click Next
    2.40 +
    2.41 +14. Click 'Have Disk' and go to the locaton where you put the .inf files.
    2.42 +
    2.43 +15. Select the 'Xen PCI Device Hider Driver' (I know, it's a stupid name) and install it, again accepting the unsigned driver warning.
    2.44 +
    2.45 +16. Open the registry editor (Start -> Run, then type 'regedit')
    2.46 +
    2.47 +17. In the registry editor, open the key 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceGroupOrder' and modify the List value so that WdfLoadGroup is before Boot Bus Extender.
    2.48 +
    2.49 +18. edit your boot.ini to look something like this:
    2.50 +
    2.51 +"
    2.52 +[boot loader]
    2.53 +timeout=30
    2.54 +default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    2.55 +[operating systems]
    2.56 +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetect
    2.57 +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise, PV" /noexecute=optout /fastdetect /gplpv
    2.58 +"
    2.59 +
    2.60 +19. The main thing in the above step is that you have a line with /gplpv on the end. This tells the PV drivers to activate, otherwise they will pretty much sit silent.
    2.61 +
    2.62 +20. Reboot. If it doesn't work then email me with some details and i'll see what I can do.
    2.63 +
    2.64 +
    2.65 +
    2.66 +Without the /gplpv option specified, the xenvbd driver will only pick up on devices you have added since boot, so you can still test it without specifying /gplpv and doing something like the following in Dom0:
    2.67 +
    2.68 +"
    2.69 +xm block-attach mywindowsdomain phy:/dev/someblockdevice /dev/hdc w
    2.70 +"
    2.71 +
    2.72 +I'm pretty sure that you need to specify the 'phy:' otherwise the backend doesn't seem to publish the block and sector sizes correctly.
    2.73 +
    2.74 +If you do the block-attach, then your block device should show up under windows, and you can partition it etc.
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/README.txt	Sun Nov 11 16:07:56 2007 +1100
     3.3 @@ -0,0 +1,16 @@
     3.4 +This is my GPL'd Xen HVM PV drivers for Windows. You can contact me at james.harper@bendigoit.com.au, or on the xen-devel mailing list.
     3.5 +
     3.6 +Only block device drivers are supported so far. Also it's probably only really useful to anyone who knows something about windows driver development.
     3.7 +
     3.8 +My test environment is Xen 3.1.1 (64 bit Hypervisor) and Windows 2003 sp2 (32 bit PAE). YMMV.
     3.9 +
    3.10 +You can get the source using Mercurial at http://xenbits.xensource.com/ext/win-pvdrivers.hg.
    3.11 +
    3.12 +Please do not in any way consider it ready for production use. Definitely do not use them on a production DomU. While I have never seen them cause a problem with the hypervisor or Dom0, I would also be very
    3.13 +wary of using them on a production physical machine too. It now seems fairly sane in use, I haven't had a crash for a while, but I haven't done nearly enough testing yet.
    3.14 +
    3.15 +See BUILDING.txt for instructions on building the drivers.
    3.16 +
    3.17 +See INSTALLING.txt for instructions on installing the drivers.
    3.18 +
    3.19 +See TODO.txt for known problems and future plans.
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/TODO.txt	Sun Nov 11 16:07:56 2007 +1100
     4.3 @@ -0,0 +1,18 @@
     4.4 +The source code still needs a tidy up. The Windows DDK stuff has it's own coding style which I've imitated in places, and then xen has it's own too, so this code is mostly one, the other, both, or neither. I'll
     4.5 +get to that as soon as I figure out what coding style to use and where.
     4.6 +
     4.7 +Known problems or things that need doing to make it properly useful:
     4.8 +. Test under envirnments other than 32-bit PAE Windows 2003. Almost certainly won't work under 64 bit
     4.9 +. Doesn't unload properly
    4.10 +. No power management
    4.11 +. Almost certainly won't support migration or suspend/resume.
    4.12 +. Probably really poor performance - no optimisation done at all yet.
    4.13 +. Probably lots of other things too.
    4.14 +. Put up a binary release so it can get some further testing
    4.15 +
    4.16 +TODO:
    4.17 +. Do some performance testing
    4.18 +. Implement a nice shutdown so that 'xm shutdown domain' works (need a user space driver to do this)
    4.19 +. network adapters (vif) (Andy Grover is looking at this)
    4.20 +. virtual scsi (eg a front end for the scsi passthrough stuff)
    4.21 +. balloon drivers (this should actually be pretty easy)