Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citrix Systems

12,122 views

Published on

This talk will give a brief background to the Xen Project Windows PV driver architecture for those who are not already familiar. It will then go on to update the community on recent changes to the drivers, and planned future changed. It will also cover the new HID and console drivers that have been introduced to the supported set, including demonstrations of those drivers.

Published in: Technology
  • Be the first to comment

XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citrix Systems

  1. 1. Windows PV Drivers: Status and Updates Paul Durrant, Senior Principal Software Engineer, Citrix Systems R&D 1
  2. 2. History: Citrix XenServer PV Drivers 2
  3. 3. ● Closed source drivers specifically for XenServer ○ Assumptions and custom hacks 3 XenServer Legacy PV Drivers
  4. 4. ● Closed source drivers specifically for XenServer ○ Assumptions and custom hacks ● Lots of interdependencies ○ Direct function calls between modules 4 XenServer Legacy PV Drivers
  5. 5. ● Closed source drivers specifically for XenServer ○ Assumptions and custom hacks ● Lots of interdependencies ○ Direct function calls between modules ● Installed together via an NSIS[1] installer 5 XenServer Legacy PV Drivers [1] See https://sourceforge.net/projects/nsis
  6. 6. ● Closed source drivers specifically for XenServer ○ Assumptions and custom hacks ● Lots of interdependencies ○ Direct function calls between modules ● Installed together via an NSIS[1] installer ● Used prior to XenServer 7.0 6 XenServer Legacy PV Drivers [1] See https://sourceforge.net/projects/nsis
  7. 7. 7 New XenServer PV Drivers
  8. 8. ● Most drivers completely re-written ○ No assumptions or custom hacks 8 New XenServer PV Drivers
  9. 9. ● Most drivers completely re-written ○ No assumptions or custom hacks ● Interdependencies removed or controlled ○ No direct function calls ○ Use interfaces 9 New XenServer PV Drivers
  10. 10. ● Most drivers completely re-written ○ No assumptions or custom hacks ● Interdependencies removed or controlled ○ No direct function calls ○ Use interfaces ● Can be separately installed ○ Available on Windows Update 10 New XenServer PV Drivers
  11. 11. ● Most drivers completely re-written ○ No assumptions or custom hacks ● Interdependencies removed or controlled ○ No direct function calls ○ Use interfaces ● Can be separately installed ○ Available on Windows Update ● Open source ○ Adopted by Xen Project 11 New XenServer PV Drivers
  12. 12. URLs ● Project Front Page: https://www.xenproject.org/developers/teams/windows-pv-drivers.html ● Driver Repositories: http://xenbits.xen.org/gitweb/?a=project_list;pf=pvdrivers ● Driver Binaries: http://xenbits.xen.org/pvdrivers/win ● Mailing List: win-pv-devel@lists.xenproject.org
  13. 13. Background: Windows Device Drivers 13
  14. 14. Background: Device Objects PDO Physical Device Object
  15. 15. Background: Device Objects PDO Physical Device Object FDO Function Device Object
  16. 16. Background: Device Objects PDO Physical Device Object FDO Function Device Object FiltDO Filter Device Object
  17. 17. Background: Device Driver Hierarchy Bus Driver
  18. 18. Background: Device Driver Hierarchy Function Driver
  19. 19. Background: Device Driver Hierarchy Function Driver Function driver FDO binds to bus driver PDO
  20. 20. Background: Device Driver Hierarchy BAR FOO DRV.SYS DRV.INF [Inst.NT$ARCH$] Name = Tag, FOOBAR [Tag] ; Installation details Function driver binds to PDO by name Binding is controlled by driver INF file
  21. 21. Background: Device Driver Hierarchy Filter Driver
  22. 22. Background: Device Driver Hierarchy Filter Driver Interposes on IRP communication
  23. 23. Background: Device Driver Hierarchy Filter Driver Insertion controlled by registry
  24. 24. Background: Device Driver Hierarchy Function drivers can also be bus drivers
  25. 25. Architecture: Core Windows PV Drivers 25
  26. 26. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS
  27. 27. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS Main PV bus infrastructure
  28. 28. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS PV network subsystem
  29. 29. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS PV storage subsystem
  30. 30. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS Xen Platform or Xen PV PCI device
  31. 31. Core PV Driver Hierarchy XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS PCI Class filter
  32. 32. Core PV Driver Hierarchy Core Xen interface XEN.SYS XENFILT.SYS XENBUS.SYS XENVIF.SYS XENVBD.SYS XENNET.SYS
  33. 33. Core PV Driver Packaging XENBUS.INF XENVBD.INFXENVIF.INF XENNET.INF
  34. 34. Core PV Driver Packaging XENBUS.INF XENVBD.INFXENVIF.INF XENNET.INF No direct function calls
  35. 35. Architecture: Windows PV Driver Interfaces 35
  36. 36. Interface Negotiation IRP_MN_QUERY_INTERFACE Subscriber specifies interface GUID and version Provider Subscriber
  37. 37. Interface Negotiation IRP_MN_QUERY_INTERFACE Provider hands back a table containing methods and contextContext Method 1 Method 2
  38. 38. Interface Negotiation Acquire and Release are present in all interfaces for reference counting purposes Context Acquire Release
  39. 39. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 39 Driver Interface Examples ● XENVIF ○ VIF
  40. 40. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 40 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed ● XENVIF ○ VIF
  41. 41. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 41 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed Drivers can register functions to be called on resume from suspend ● XENVIF ○ VIF
  42. 42. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 42 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed Drivers can register functions to be called on resume from suspend These are self explanatory ● XENVIF ○ VIF
  43. 43. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 43 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed Drivers can register functions to be called on resume from suspend These are self explanatory ● XENVIF ○ VIF Useful for managing resource allocation
  44. 44. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 44 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed Drivers can register functions to be called on resume from suspend These are self explanatory ● XENVIF ○ VIF Useful for managing resource allocation Pseudo slab allocator
  45. 45. ● XENBUS ○ DEBUG ○ SUSPEND ○ EVTCHN ○ GNTTAB ○ STORE ○ RANGE_SET ○ CACHE 45 Driver Interface Examples Drivers can register a function to be called when Xen debug-key ‘q’ is pressed Drivers can register functions to be called on resume from suspend These are self explanatory ● XENVIF ○ VIF Useful for managing resource allocation Pseudo slab allocator Implementation of Xen netif protocol
  46. 46. Interface Compatibility IRP_MN_QUERY_INTERFACE GUID = DEBUG Version = X
  47. 47. Interface Compatibility IRP_MN_QUERY_INTERFACE GUID = DEBUG Version = X DEBUG code only implements version Y
  48. 48. Interface Compatibility IRP_MN_QUERY_INTERFACE GUID = DEBUG Version = X STATUS_NOT_SUPPORTED DEBUG code only implements version Y
  49. 49. Interface Compatibility IRP_MN_QUERY_INTERFACE GUID = DEBUG Version = X STATUS_NOT_SUPPORTED Need to stop this from happening DEBUG code only implements version Y
  50. 50. Interface Compatibility BAR ● Provider implementations should be compatible with older versions of interfaces FOO
  51. 51. Interface Compatibility BAR ● Provider implementations should be compatible with older versions of interfaces ● For each new version, modify the PDO binding name FOO Version X FOOBAR_1 Version Y FOOBAR_2
  52. 52. Interface Compatibility BAR ● Provider implementations should be compatible with older versions of interfaces ● For each new version, modify the PDO binding name FOO Version X FOOBAR_1 Version Y FOOBAR_2 [Inst.NT$ARCH$] Name = Tag, FOOBAR_1 ● Subscriber chooses the corresponding binding name
  53. 53. Interface Compatibility Upgrade Provider Upgrade Subscriber
  54. 54. Interface Compatibility Upgrade Provider Providers backwards compatible with older subscribers Upgrade Subscriber
  55. 55. Interface Compatibility Upgrade Provider Providers backwards compatible with older subscribers Upgrade Subscriber Won’t displace older subscriber until new provider binding is available
  56. 56. Project Status 56
  57. 57. 57 We graduated!
  58. 58. 58 New stable release tagged, built, and signed
  59. 59. New HID drivers
  60. 60. Previously, when you commented these lines out of your xl.cfg...
  61. 61. This is what you get ...
  62. 62. Problem solved!
  63. 63. New console driver
  64. 64. Means we can now do this...
  65. 65. Q&A 65

×