Drivers Xen Gpl Pv Driver Developers



Xen 2.0.x (in PV-only age) Paravirtualized USB support was temporarily into the tree. But eventually removed and not released. Xen 3.0 Qemu-dm supported UHCI emulation for HVM domain. Xen 3.2 PCI pass-through with IOMMU supported attaching USB Host Controller to HVM domain. Xen 3.4 (current unstable) Not well supported USB1.1 only Works well. The GPLPV driver is a driver for Microsoft Windows, which enables Windows DomU systems virtualised in Xen to access the network and block drivers of the Xen Dom0. This provides a significant performance and reliability gain over the standard devices emulated by Xen/QEMU. The GPLPV driver is a free software driver developed by James Harper. @olivierlambert So I just created a new Win 10 VM and made sure to use the template. I created this VM in the XCP-NG XenCenter. I then went into XOA and 'Windows Update Tools' is checked to the on position by default. Windows Xen PV drivers are needed for QWT to function because libvchan, our inter-VM communications library, depends on the low-level Xen APIs (event channels, memory sharing and XenStore). History Qubes OS R2 used GPL Windows PV drivers written by James Harper with additions by Chris Smowton (user mode interfaces).

Howto install a Windows 2k8 r2 on a xen host with GPL PV drivers v0.10.0.130

Contents

[Update: Signed drivers can be found here]

The machine is called 'slate', and has a single 32Gbyte disk. The xen host is running (a very old) Fedora 8 with xen-3.1.2-5.fc8.

Install Server 2008 R2

Assign a lump of disk (from a LVM volume) for the operating system (32Gbytes), and boot from the installation media DVD. Use a VNC client to step through the graphical installation. Use the following 'xm' style configuration:

Note: A Windows Vista x64 machine was used as the VNC client during installation. For some reason connecting to the VNC session over a Putty SSH tunnel using the loopback interface didn't work (the connection hung during the initial handshake). Binding to the ethernet interface of the Xen host, and going directly worked well.

GPL PV Drivers

Given the Windows machine is Server 2008 R2 x64, the drivers must have 'wlh' and 'amd64' in their name. The current revision is gplpv_fre_wlh_AMD64_0.10.0.130.

The installation of the drivers was very straightforward. Given the drivers are signed for 'test mode' operation, and a certificate is provided, the pain to get the drivers installed is reasonably low. I created an ISO image with the MSI install program on it, and added the ISO image as a CDROM device. This means the qemu network adapter doesn't have to be used or configured (but this would be another way to get the drivers onto the machine).

The 'xm' style VM configuration with the gpl pv driver as a second CDROM device is:

The four steps I followed are:

  1. set 'test signing' mode on
  2. reboot
  3. install driver MSI
  4. reboot

To enable test signing mode execute:

Once the driver was installed and the machine was rebooted, I configured a static IPv4 and IPv6 address on the network adapter, and enabled remote desktop.

Device manager indicated that the driver was being used, by the presence of the 'Xen Net Device Driver' and 'Xen PV Disk SCSI Disk Device'.

Note: The shutdown service works well 'out of the box'. Shutting the machine down from the xen host with 'xm shutdown slate' performs an orderly shutdown.

Drivers Xen Gpl Pv Driver Developers -

Running 'xm' configuration

Once the machine is up and running:

  • change the boot device back to 'c' drive
  • change the network interface to 'type=paravirtualised' (so that qemu-dm doesn't create a tap device)

Drivers Xen Gpl Pv Driver Developers 2020

Residual Issues

Given I am running an old version of xen in domain 0 (v3.1.2), there is an issue with using the GPL PV driver such that the CDROM devices no longer function, and the 'Intel(r) 82371SB PCI Bus Master IDE Controller' device has an issue.

Upgrading to the latest xen would solve this issue.

Links

  • GPL PV v0.10.0.97 announcement
  • Installing Xen Windows Gpl Pv (outdated)
  • Driver Signature Enforcement Override
  • Installing signed GPLPV drivers

Appendices

Windows Server 2008 R2 Installation gallery

Ready to install. Pick the time and currency format.

Select which version of the operating system to install.

Accept the license terms (like there is a real choice).

Pick custom install (this is a fresh install, not an upgrade)

The install program creates a 100MByte partition. There was no choice.

Installation begins. Note that the machine does reboot during the install.

And reboots...

Set the Administrator password

Enter a new password

Overall the installation was reasonably easy and quick.

GPL PV Driver Installation Gallery

Once the 'bcdedit /set testsigning on' is run, and the machine has rebooted, the 'test mode' should display in the lower right of the desktop.

Drivers Xen Gpl Pv Driver Developers

Run the GPL PV driver installation msi.

Accept the license.

The custom install shows what will be installed. Note how the 'test mode' signing certificate is installed.

Install.

Install the drivers, and always trust the 'GPLPV_Test_Cert'.

The installation is done.

Reboot the system to activate the drivers.

After rebooting, the device manager shows the following devices (Note: the system is using Xen 3.1.2 on the host - modern xen hosts may hide more)


Needs Review

Important page: Some parts of page are out-of-date and needs to be reviewed and corrected!


About

These drivers allow Windows to make use of the network and block backend drivers in Dom0, instead of the virtual PCI devices provided by QEMU. This gives Windows a substantial performance boost, and most of the testing that has been done confirms that. This document refers to the new WDM version of the drivers, not the previous WDF version. Some information may apply though.

I was able to see a network performance improvement of 221mbit/sec to 998mb/sec using iperf to test throughput. Disk IO, testing via crystalmark, improved from 80MB/sec to150MB/sec on 512-byte sequential writes and 180MB/sec read performance.

With the launch of new Xen project pages the main PV driver page on www.xenproject.org keeps a lot of the more current information regarding the paravirtualization drivers.

Supported Xen versions

Gplpv >=0.11.0.213 were tested for a long time on Xen 4.0.x and are working, should also be working on Xen 4.1.

Gplpv >=0.11.0.357 tested and working on Xen 4.2 and Xen 4.3 unstable.

05/01/14 Update:

The signed drivers from ejbdigital work great on Xen 4.4.0. If you experience a bluescreen while installing these drivers, or after a rebootafter installing them, please try adding device_model_version = 'qemu-xen-traditional'. I had an existing 2008 R2 x64 system that consitently failed with a BSOD afterthe gpl_pv installation. Switching to the 'qemu-xen-traditional' device model resolved the issue. However, on a clean 2008 R2 x64 system, I did not have to makethis change, so please bear this in mind if you run into trouble.

I do need to de-select 'Copy Network Settings' during a custom install of gpl_pv. Leaving 'Copy network settings' resulted in a BSOD for me in 2008R2 x64.

I run Xen 4.4.0-RELEASE built from source on Debian Jessie amd64.

PV drivers 1.0.1089 tested on windows 7 x64 pro SP1, dom0 Debian Wheezy with xen 4.4 from source and upstream qemu >=1.6.1 <=2.0.

Notes: - upstream qemu version 1.6.0 always and older versions in some cases have critical problem with hvm domUs not related to PV drivers. - if there are domUs disks performance problem using blktap2 disks is not PV drivers problem, remove blktap2 use qdisk of upstream qemu instead for big disks performance increase (mainly in write operations)

Supported Windows versions

In theory the drivers should work on any version of Windows supported by Xen. With their respective installer Windows 2000 and later to Windows 7, 32 and 64-bit, also server versions. Please see the release notes with any version of gpl_pv you may download to ensure compatibility.

I have personally used gpl_pv on Windows 7 Pro x64, Windows Server 2008 x64, Windows Server 2008 R2 x64 and had success.

Xen Pv Drivers Windows

Recently I gave Windows 10 a try under Xen 4.4.1 (using Debian Jessie). The paravirtualization drivers still work. The drivers have not been installed from scratch but have been kept during the Windows Upgrade from Windows 7 to Windows 10.

Building

Sources are now available from the Xen project master git repository:


In addition you will need the Microsoft tools as described in the README files. The information under 'Xen Windows GplPv/Building' still refers to the old Mercurial source code repository and is probably dated.

Downloading

New, Signed, GPL_PV drivers are available at what appears to be the new home of GPL_PV athttp://www.ejbdigital.com.au/gplpv

These may be better than anything currently available from meadowcourt or univention.

Older binaries, and latest source code, are available from http://www.meadowcourt.org/downloads/

  • There is now one download per platform/architecture, named as follows:
  • platform is '2000' for 2000, 'XP' for XP, '2003' for 2003, and 'Vista2008' for Vista/2008/7
  • arch is 'x32' for 32 bit and 'x64' for 64 bits
  • 'debug' if is build which contains debug info (please use these if you want any assistance in fixing bugs)
  • without 'debug' build which contains no debug info

Signed drivers

Newer, signed, GPL_PV drivers are available at what appears to be the new home of GPL_PV at http://www.ejbdigital.com.au/gplpv

You can get older, signed, GPLPV drivers from univention.
Signed drivers allow installation on Windows Vista and above (Windows 7, Windows Server 2008, Windows 8, Windows Server 2012) without activating the testsigning.

Installing / Upgrading

Once built (or downloaded for a binary release), the included NSIS installer should take care of everything. See here for more info, including info on bcdedit under Windows 2008 / Vista.

/! Please definitly visit the link above which links to /Installing . It holds information to not crash your Installation. It concerns the use of the /GPLPV boot parameter.

Using

Previous to 0.9.12-pre9, '/GPLPV' needed to be specified in your boot.ini file to activate the PV drivers. As of 0.9.12-pre9, /NOGPLPV in boot.ini will disable the drivers, as will booting into safe mode. With 'shutdownmon' running, 'xm shutdown' and 'xm reboot' issued from Dom0 should do the right thing too.

In your machine configuration, make sure you don't use the ioemu network driver. Instead, use a line like:

  • vif = []

Also fixed MAC address can be set,useful to the risk of reactivation of a license for Windows.

Known Issues

This is a list of issues that may affect you, or may not. These are not confirmed issues that will consistently repeat themselves. An issuelisted here should not cause you to not try gpl_pv in a safe environment. Please report both successes and failures to the mailing list, it all helps!

  • An OpenSolaris Dom0 is reported not to work, for reasons unknown.
  • Checksum offload has been reported to not work correctly in some circumstances.
  • Shutdown monitor service in some cases is not added, and must be added manually.
  • Network is not working after restore with upstream qemu, workaround for now is set fixed mac address in domUs xl cfg file.
  • Installing with 'Copy Network Settings' may result in a blue screen.
  • A blue screen may result if you are not using the traditional qemu emulator.

PLEASE TEST YOUR PERFORMANCE USING IPERF AND/OR CRYSTALMARK BEFORE ASSUMING THERE IS A PROBLEM WITH GPL_PV ITSELF

Note: I was using pscp to copy a large file from another machine to a Windows 2008 R2 DomU machine and was routinely only seeing 12-13MB/sec download rate. I consistentlyhad blamed windows and gpl_pv as the cause of this. I was wrong! Testing the network interface with iperf showed a substantial improvement after installing gpl_pv and thedisk IO showed great performance when tested with CrystlMark. I was seeing a bug in pscp itself. Please try to test performance in a multitude of ways before submittinga complaint or bug report.

Using the windows debugger under Xen

Drivers Xen Gpl Pv Driver Developers

Set up Dom0

  1. Change/add the serial line to your Windows DomU config to say serial='pty'
  2. Add a line to /etc/services that says 'windbg_domU 4440/tcp'. Change the domU bit to the name of your windows domain.
  3. Add a line to /etc/inetd.conf that says 'windbg_domU stream tcp nowait root /usr/sbin/tcpd xm console domU'. Change the domU bit to the name of your domain. (if you don't have an inetd.conf then you'll have to figure it out yourself... basically we just need a connection to port 4440 to connect to the console on your DomU)
  4. Restart inetd.

Set up the machine you will be debugging on - another Windows machine that can connect to your Dom0 from.

  1. Download the windows debugger from Microsoft and install.
  2. Download the 'HW Virtual Serial Port' application from HW Group and install. Version 3 appears to be out, but i've only ever used 2.5.8.

Boot your DomU

  1. xm create DomU (or whatever you normally use to start your DomU)
  2. Press F8 when you get to the windows text boot menu and select debugging mode, then boot. The system should appear to hang before the splash screen starts

Start HWVSP

Developers
  1. Start the HW Virtual Serial Port application
  2. Put the IP address or hostname of your Dom0 in under 'IP Address'
  3. Put 4440 as the Port
  4. Select an unused COM port under 'Port Name' (I just use Com8)
  5. Make sure 'NVT Enable' in the settings tab is unticked
  6. Save your settings
  7. Click 'Create COM'. If all goes well it shuold say 'Virtual serial port COM8 created' and 'Connected device <hostname>'

Run the debugger

  1. Start windbg on your other windows machine
  2. Select 'Kernel Debug' from the 'File' menu
  3. Select the COM tab, put 115200 in as the baud rate, and com8 as the port. Leave 'Pipe' and 'Reconnect' unticked
  4. Click OK
  5. If all goes well, you should see some activity, and the HWVSP counters should be increasing. If nothing happens, or if the counters start moving and then stop, quit windbg, delete the com port, and start again from 'Start HWVSP'. Not sure why but it doesn't always work the first time.

Debugging

  1. The debug output from the PV drivers should fly by. If something isn't working, that will be useful when posting bug reports.
  2. If you actually want to do some debugging, you'll need to have built the drivers yourself so you have the src and pdb files. In the Symbol path, add '*SRV*c:websymbols*http://msdl.microsoft.com/download/symbols;c:path_to_sourcetargetwinxpi386'. change winxpi386 to whatever version you are debugging.
  3. Actually using the debugger is beyond the scope of this wiki page :)

Developers

Xen Windows Pv

  • xenpci driver - communicates with Dom0 and implements the xenbus and event channel interfaces
  • xenhide driver - disables the QEMU PCI ATA and network devices when the PV devices are active
  • xenvbd driver - block device driver
  • xennet driver - network interface driver
  • xenstub driver - provides a dummy driver for vfb and console devices enumerated by xenpci so that they don't keep asking for drivers to be provided.

Drivers Xen Gpl Pv Driver Developers Download

Retrieved from 'https://wiki.xenproject.org/index.php?title=Xen_Windows_GplPv&oldid=16267'