win-pvdrivers

changeset 123:9dbe0f19c27e

docs: wrap at 72 chars. Update BUILDING.txt -- BLD at top dir makes all drivers.
author Andy Grover <andy.grover@oracle.com>
date Tue Jan 15 12:05:12 2008 -0800 (2008-01-15)
parents 566045f9537d
children 403f2c20466e
files BUILDING.txt INSTALLING.txt README.txt TODO.txt
line diff
     1.1 --- a/BUILDING.txt	Tue Jan 15 11:58:37 2008 -0800
     1.2 +++ b/BUILDING.txt	Tue Jan 15 12:05:12 2008 -0800
     1.3 @@ -1,15 +1,31 @@
     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. http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx is probably a better 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. Download and install the Windows Driver Framework SDK (6000, not 6001 
     1.8 +which is Longhorn only) from Microsoft. You have to jump through a few 
     1.9 +hoops to get it, but it is free (as in beer of course. Microsoft don't 
    1.10 +do the 'as in speech' variety of free). It's also huge. 
    1.11 +http://www.microsoft.com/whdc/driver/wdf/default.mspx is a good place to 
    1.12 +start. http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx is 
    1.13 +probably a better place to start. 
    1.14  
    1.15 -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.16 +2. Start the WDF Build Environment that best suits your needs. I've only 
    1.17 +ever used 2003 32 Bit Checked. 
    1.18  
    1.19 -4. Go into each of xenpci, xenvbd, xennet, and xenhide and do a 'BLD'.
    1.20 +3. Use Mercurial (get it from 
    1.21 +http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages) to get 
    1.22 +the latest sources from 
    1.23 +http://xenbits.xensource.com/ext/win-pvdrivers.hg. 
    1.24  
    1.25 -5. Assuming all went well, your drivers should be in target/<sys>/i386 directory. (<sys> is winnet or winxp)
    1.26 +4. From the top directory, type 'BLD'. 
    1.27  
    1.28 -I've probably omitted some vitally important step from the above, so please let me know if you need any assistance compiling.
    1.29 +5. Assuming all went well, your drivers should be in target/<sys>/i386 
    1.30 +directory. (<sys> is winnet or winxp, depending on your DDK compilation 
    1.31 +environment.) 
    1.32  
    1.33 -See the INSTALLING.txt file for information on how to install.
    1.34 +I've probably omitted some vitally important step from the above, so 
    1.35 +please let me know if you need any assistance compiling. 
    1.36 +
    1.37 +See the INSTALLING.txt file for information on how to install. 
    1.38  
    1.39 -There is also a simple C# app which will enable 'graceful' shutdown (eg 'xm shutdown' and 'xm reboot' will do the right thing). Open Xen.sln in Visual Studio to build it.
    1.40 \ No newline at end of file
    1.41 +There is also a simple C# app which will enable 'graceful' shutdown (eg 
    1.42 +'xm shutdown' and 'xm reboot' will do the right thing). Open Xen.sln in 
    1.43 +Visual Studio to build it. 
    1.44 +
     2.1 --- a/INSTALLING.txt	Tue Jan 15 11:58:37 2008 -0800
     2.2 +++ b/INSTALLING.txt	Tue Jan 15 12:05:12 2008 -0800
     2.3 @@ -1,69 +1,92 @@
     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 +Please follow the steps here exactly. If you don't, you may be left with 
     2.6 +an unbootable machine (although 'Last known good configuration' should 
     2.7 +make it bootable again). 
     2.8  
     2.9 -1. Copy the driver files that you built by following the BUILDING.txt steps (or that you got from a binary dist), so that on your testing machine the tree looks like this:
    2.10 +1. Copy the driver files that you built by following the BUILDING.txt 
    2.11 +steps (or that you got from a binary dist), so that on your testing 
    2.12 +machine the tree looks like this: 
    2.13  
    2.14 -Xen\<arch>\xenhide.inf
    2.15 -Xen\<arch>\xenpci.inf
    2.16 -Xen\<arch>\xenvbd.inf
    2.17 -Xen\<arch>\i386\xenaddresource.sys
    2.18 -Xen\<arch>\i386\xenhide.sys
    2.19 -Xen\<arch>\i386\xenpci.sys
    2.20 -Xen\<arch>\i386\xenvbd.sys
    2.21 -Xen\<arch>\i386\WdfCoInstaller01005.dll
    2.22 -(you'll need to copy WdfCoInstaller01005.dll from the redist folder in the DDK)
    2.23 -(<arch> is winxp for XP, or winnet for 2K3)
    2.24 +Xen\<arch>\xenhide.inf Xen\<arch>\xenpci.inf Xen\<arch>\xenvbd.inf 
    2.25 +Xen\<arch>\i386\xenaddresource.sys Xen\<arch>\i386\xenhide.sys 
    2.26 +Xen\<arch>\i386\xenpci.sys Xen\<arch>\i386\xenvbd.sys 
    2.27 +Xen\<arch>\i386\WdfCoInstaller01005.dll (you'll need to copy 
    2.28 +WdfCoInstaller01005.dll from the redist folder in the DDK) (<arch> is 
    2.29 +winxp for XP, or winnet for 2K3) 
    2.30  
    2.31 -2. Go to the device manager (Right click on My Computer, then select the Hardware tab, then click Device Manager)
    2.32 +2. Go to the device manager (Right click on My Computer, then select the 
    2.33 +Hardware tab, then click Device Manager) 
    2.34 +
    2.35 +3. Find the 'PCI Device' under 'Other Devices' - it should have an 
    2.36 +exclamation mark against it. Right click on it and select 'Update 
    2.37 +Driver...' 
    2.38  
    2.39 -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.40 -
    2.41 -4. Select 'No, not this time' in answer to 'Can Windows connect to Windows Update...' and click Next
    2.42 +4. Select 'No, not this time' in answer to 'Can Windows connect to 
    2.43 +Windows Update...' and click Next 
    2.44  
    2.45 -5. Select 'Install from a list of specific location (Advanced)' and click Next
    2.46 +5. Select 'Install from a list of specific location (Advanced)' and 
    2.47 +click Next 
    2.48  
    2.49 -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.50 +6. Untick 'Search removable media...' and tick 'Include this 
    2.51 +location...'. Enter the name of the directory where you put the .inf 
    2.52 +files, then click Next 
    2.53  
    2.54 -7. Windows should find the XenPCI driver as a candidate, and will complain that it hasn't been signed. Just accept the warning.
    2.55 +7. Windows should find the XenPCI driver as a candidate, and will 
    2.56 +complain that it hasn't been signed. Just accept the warning. 
    2.57  
    2.58 -8. Windows should load the XenPCI driver, and then give you 4 more 'Other Devices' - console, vfb, vif, and vbd.
    2.59 +8. Windows should load the XenPCI driver, and then give you 4 more 
    2.60 +'Other Devices' - console, vfb, vif, and vbd. 
    2.61  
    2.62 -9. Repeat steps 3-7 for the vbd device. Windows should then load the XenVBD driver.
    2.63 +9. Repeat steps 3-7 for the vbd device. Windows should then load the 
    2.64 +XenVBD driver. 
    2.65  
    2.66 -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.67 -
    2.68 -11. Select 'No, not this time' in answer to 'Can Windows connect to Windows Update...' and click Next
    2.69 +10. The next bit is a bit tricker. In Device Manager, drill down on 
    2.70 +System devices and right click on PCI Bus and select Update Driver. 
    2.71  
    2.72 -12. Select 'Install from a list or specific location (Advanced)' and click Next
    2.73 +11. Select 'No, not this time' in answer to 'Can Windows connect to 
    2.74 +Windows Update...' and click Next 
    2.75 +
    2.76 +12. Select 'Install from a list or specific location (Advanced)' and 
    2.77 +click Next 
    2.78  
    2.79 -13. This time, select 'Don't search. I will choose the driver to install' and click Next
    2.80 +13. This time, select 'Don't search. I will choose the driver to 
    2.81 +install' and click Next 
    2.82 +
    2.83 +14. Click 'Have Disk' and go to the locaton where you put the .inf 
    2.84 +files. 
    2.85  
    2.86 -14. Click 'Have Disk' and go to the locaton where you put the .inf files.
    2.87 +15. Select the 'Xen PCI Device Hider Driver' (I know, it's a stupid 
    2.88 +name) and install it, again accepting the unsigned driver warning. 
    2.89 +
    2.90 +16. edit your boot.ini to look something like this: 
    2.91  
    2.92 -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.93 -
    2.94 -16. edit your boot.ini to look something like this:
    2.95 +" [boot loader] timeout=30 
    2.96 +default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] 
    2.97 +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, 
    2.98 +Enterprise" /noexecute=optout /fastdetect 
    2.99 +multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, 
   2.100 +Enterprise, GPLPV" /noexecute=optout /fastdetect /gplpv " 
   2.101  
   2.102 -"
   2.103 -[boot loader]
   2.104 -timeout=30
   2.105 -default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
   2.106 -[operating systems]
   2.107 -multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetect
   2.108 -multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise, GPLPV" /noexecute=optout /fastdetect /gplpv
   2.109 -"
   2.110 +17. The main thing in the above step is that you have a line with /gplpv 
   2.111 +on the end. This tells the PV drivers to activate, otherwise they will 
   2.112 +pretty much sit silent. 
   2.113  
   2.114 -17. 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.115 +18. Reboot and select the /gplpv entry. If it doesn't work then email me 
   2.116 +with some details and i'll see what I can do. 
   2.117 +
   2.118 +Without the /gplpv option specified, the xenvbd driver will only pick up 
   2.119 +on devices you have added since boot, so you can still test it without 
   2.120 +specifying /gplpv and doing something like the following in Dom0: 
   2.121  
   2.122 -18. Reboot and select the /gplpv entry. If it doesn't work then email me with some details and i'll see what I can do. 
   2.123 +" xm block-attach mywindowsdomain phy:/dev/someblockdevice /dev/hdc w " 
   2.124  
   2.125 -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.126 +I'm pretty sure that you need to specify the 'phy:' otherwise the 
   2.127 +backend doesn't seem to publish the block and sector sizes correctly. 
   2.128  
   2.129 -"
   2.130 -xm block-attach mywindowsdomain phy:/dev/someblockdevice /dev/hdc w
   2.131 -"
   2.132 +If you do the block-attach, then your block device should show up under 
   2.133 +windows, and you can partition it etc. 
   2.134  
   2.135 -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.136 +19. If you have built ShutdownMon, run "ShutdownMon -i" which will 
   2.137 +install it as a service. You will need to change the service to 
   2.138 +'Automatic' and start it (or reboot). 'xm shutdown' and 'xm reboot' 
   2.139 +should then do the right thing. 
   2.140  
   2.141 -If you do the block-attach, then your block device should show up under windows, and you can partition it etc.
   2.142 -
   2.143 -19. If you have built ShutdownMon, run "ShutdownMon -i" which will install it as a service. You will need to change the service to 'Automatic' and start it (or reboot). 'xm shutdown' and 'xm reboot' should then do the right thing.
   2.144 \ No newline at end of file
     3.1 --- a/README.txt	Tue Jan 15 11:58:37 2008 -0800
     3.2 +++ b/README.txt	Tue Jan 15 12:05:12 2008 -0800
     3.3 @@ -1,16 +1,26 @@
     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 +This is my GPL'd Xen HVM PV drivers for Windows. You can contact me at 
     3.8 +james.harper@bendigoit.com.au, or on the xen-devel mailing list. 
     3.9  
    3.10 -My test environment is Xen 3.1.1 (64 bit Hypervisor) and Windows 2003 sp2 (32 bit PAE). YMMV.
    3.11 +Only block device drivers are supported so far. Also it's probably only 
    3.12 +really useful to anyone who knows something about windows driver 
    3.13 +development. 
    3.14  
    3.15 -You can get the source using Mercurial at http://xenbits.xensource.com/ext/win-pvdrivers.hg.
    3.16 +My test environment is Xen 3.1.1 (64 bit Hypervisor) and Windows 2003 
    3.17 +sp2 (32 bit PAE). YMMV. 
    3.18 +
    3.19 +You can get the source using Mercurial at 
    3.20 +http://xenbits.xensource.com/ext/win-pvdrivers.hg. 
    3.21  
    3.22 -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.23 -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.24 +Please do not in any way consider it ready for production use. 
    3.25 +Definitely do not use them on a production DomU. While I have never seen 
    3.26 +them cause a problem with the hypervisor or Dom0, I would also be very 
    3.27 +wary of using them on a production physical machine too. It now seems 
    3.28 +fairly sane in use, I haven't had a crash for a while, but I haven't 
    3.29 +done nearly enough testing yet. 
    3.30  
    3.31 -See BUILDING.txt for instructions on building the drivers.
    3.32 +See BUILDING.txt for instructions on building the drivers. 
    3.33  
    3.34 -See INSTALLING.txt for instructions on installing the drivers.
    3.35 +See INSTALLING.txt for instructions on installing the drivers. 
    3.36  
    3.37 -See TODO.txt for known problems and future plans.
    3.38 +See TODO.txt for known problems and future plans. 
    3.39 +
     4.1 --- a/TODO.txt	Tue Jan 15 11:58:37 2008 -0800
     4.2 +++ b/TODO.txt	Tue Jan 15 12:05:12 2008 -0800
     4.3 @@ -1,8 +1,11 @@
     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 +The source code still needs a tidy up. The Windows DDK stuff has it's 
     4.7 +own coding style which I've imitated in places, and then xen has it's 
     4.8 +own too, so this code is mostly one, the other, both, or neither. I'll 
     4.9 +get to that as soon as I figure out what coding style to use and where. 
    4.10  
    4.11  Known problems or things that need doing to make it properly useful:
    4.12 -. Test under envirnments other than 32-bit PAE Windows 2003. Almost certainly won't work under 64 bit
    4.13 +. Test under envirnments other than 32-bit PAE Windows 2003. Almost certainly
    4.14 +  won't work under 64 bit
    4.15  . No power management
    4.16  . Almost certainly won't support migration or suspend/resume.
    4.17  . Reports of problems on Intel systems
    4.18 @@ -11,7 +14,6 @@ Known problems or things that need doing
    4.19  
    4.20  TODO:
    4.21  . Do some performance testing
    4.22 -. network adapters (vif) (Andy Grover is looking at this)
    4.23  . virtual scsi (eg a front end for the scsi passthrough stuff)
    4.24  . balloon drivers (this should actually be pretty easy)
    4.25  . Write an installer for the above binaries to automate everything