Paul Durrant [Thu, 3 Dec 2015 12:55:31 +0000 (12:55 +0000)]
Make sure XENBUS interfaces are released when going into S4
Because a transition into and out of S4 means a new domain is built, it's
crucial that all XENBUS interfaces are released (so that things like
event channels, grant tables and the xenstore ring get re-constructed).
This patch fixes code paths where this was not being done. It also adds
some more logging during AdapterEnable/Disable and when moving between
D0 and D3.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Thu, 22 Oct 2015 14:50:58 +0000 (15:50 +0100)]
Add a registry override to veto driver installations
There are certain cases where a local installer package may wish to
prevent Windows Update installations of drivers. This can be achieved by
having the co-installer check for a registry value and fail it's pre-install
phase if the value is present.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 28 Jul 2015 16:27:04 +0000 (17:27 +0100)]
Add header/data split support
Now that XENNET is using NDIS 6.1, implement header/data split. See
NDIS documentation for more details. This requires using version 3 of the
VIF interface from XENVIF to support the requirements for data MDL
backfill.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 8 Sep 2015 16:20:57 +0000 (17:20 +0100)]
Parameterize vendor prefix and PCI device id
The XenServer PV vendor prefix ('XS') and PCI device (C000) are still
hard-coded into the XENNET package. These need to be stripped out and
replaced by values that can be customized at build time. This patch does
that.
The patch also reverts to building version.h and customizing xennet.inf
directly in build.py.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 24 Mar 2015 12:53:30 +0000 (12:53 +0000)]
Co-installer RequestReboot() invocation changes
Stop requesting reboot on uninstall of XENNET. If an admin removes the
network driver then there is no particular need to request a reboot.
However, make sure that we only remove the unplug key if the last instance
of XENNET is being removed.
On installation of XENNET, use the XENVIF 'NeedReboot' flag to determine
whether to request reboot.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Tue, 24 Mar 2015 13:14:19 +0000 (13:14 +0000)]
Revert previous commit
This patch reverts the previous commit which attempted to make XENNET
aware of multiple processor groups. The changes don't seem to work on NDIS
drivers and lead to corruption of the receiver GetLists.
A different approach is needed.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 20 Mar 2015 13:19:16 +0000 (13:19 +0000)]
Make XENNET processor group aware
Processor groups have been around for a long time in Windows and
contnuing to ignore them becomes ever more painful when trying to
pass the HCK multiple processor group device test. This patch, therefore,
modifies all the code that uses the non-group-aware kernel calls to use
the newer group aware calls.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 13 Mar 2015 13:41:42 +0000 (13:41 +0000)]
Add back useful information logging that was removed
It is useful to know when various offloads are enabled or disabled. That
information used to be logged but the logging macro was removed for some
reason when the multi-queue patches were added. This patch adds that
logging back in.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 13 Mar 2015 12:23:48 +0000 (12:23 +0000)]
OID handling improvements
The query OID code contains several mistakes in setting BytesNeeded and
BytesWritten. This patch re-factors the code slightly to fix those
mistakes and also adds warnings is the stack tries to query or set an OID
that we do not handle.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 13 Mar 2015 12:19:37 +0000 (12:19 +0000)]
Fix NDISTest PacketFilters test
The PacketFilters test fails because it has apparently discovered a whole
load of invalid filters. This, as it turns out, is not because of any bug
in the query OID code but rather in the set OID code. The code as it stands
returns success even for setting an invalid filter, and this is why the
test believes those filters are enabled.
This patch stops ignoring the resturn code of AdapterSetPacketFilter and
hence fixes the test.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Thu, 12 Mar 2015 10:22:41 +0000 (10:22 +0000)]
Fix CHANGE macro
The CHANGE(x, y) macro in adapter.c is supposed to evaluate to 0 if x and
y are identical, otherwise it is supposed to assign y to x and evaluate
to 1. The definition is incorrect though, and in the latter case the
assignment is done but the macro still evaluates to 0. This patch fixes
the problem.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Owen Smith [Thu, 5 Mar 2015 15:47:51 +0000 (15:47 +0000)]
64bit OIDs: 4-byte results are a success
When buffer is >= 8-bytes, return a 8-byte buffer,
when buffer is >= 4-bytes, return a 4-byte buffer,
else, indicate 8-bytes required and indicate failure
Owen Smith [Mon, 19 Jan 2015 16:22:11 +0000 (16:22 +0000)]
NDIS6.0 1c_64bitOIDs / 1c_IOCTLCoverage
Some QUERY OIDs should return truncated results when 4 byte buffers are
passed for 8 byte values. Avoid corner cases where the OID would succeed,
but not copy data due to wrong buffer sizes.
Paul Durrant [Tue, 7 Oct 2014 09:23:48 +0000 (10:23 +0100)]
Handle lack of IPv6 registry keys in co-installer
The co-installer attempts to copy IPv6 address information from the any
relevant emulated device to the PV device during installation, but will fail
if no IPv6 address information is present. This is not an error condition and
so the co-installer should simply skip this copying operation if no address
information is found.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Michael Brown [Wed, 17 Sep 2014 01:26:35 +0000 (02:26 +0100)]
Mark xennet.sys as boot-critical to simplify offline installation
Explicitly mark the xennet driver as boot-critical using the
"BootCritical=1" directive. This causes dism.exe to reflect the
driver when performing an offline installation, thereby making it
available on the next boot (which may be an iSCSI boot, requiring a
functioning network).
This avoids the need to hack the registry to manually install the
driver (by creating the HKLM\CurrentControlSet\Services\xennet key and
corresponding entries in the CriticalDeviceDatabase).
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
Paul Durrant [Thu, 14 Aug 2014 13:56:59 +0000 (14:56 +0100)]
Update branding
Remove the use of the 'XenServer' product name except where it is
still appropriate.
Remove use of 'Citrix' from all places except source file
copyrights.
Allow company and product name to be set at build time.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Wed, 16 Jul 2014 12:16:43 +0000 (13:16 +0100)]
Implement new API version scheme
This patch changes the way APIs work in an incompatible way. (See README.md
for details).
The patch also includes a *lot* of code tidying and movement and as such
is not really suitable for review as a patch; the resulting code should
itself be reviewed.
Given the scale of the change, the major version number has been revised to
8 and other version numbers reset to zero.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Mon, 23 Dec 2013 15:50:41 +0000 (15:50 +0000)]
Find alias hardware key rather then stopping with the software key
The DeviceInstanceID value stored in the software key appears to be
specific to newer versions of Windows so we cannot rely upon it. Instead
find the hardware key by reverse mapping via the Driver value - which is
used directly by the PnP subsystem and so should be safe to rely upon.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Fri, 30 Aug 2013 08:36:56 +0000 (09:36 +0100)]
Basic functionality.
New device binding. Header file changes. Test siging. Co-installer is
basically NUL at the moment. Need to add back in all the settings copying
code, etc.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Paul Durrant [Wed, 3 Jul 2013 08:49:10 +0000 (09:49 +0100)]
Update the minor number.
When the repo was moved from mercurial to git the build system started
build numbers from #1 again. Bump the minor version number to avoid
confusion between these new builds and old builds of the original repo.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Ben Chalmers [Fri, 21 Jun 2013 14:32:08 +0000 (15:32 +0100)]
Resync with internal repository
changeset: 100:f205cb88430a
tag: tip
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed Jun 19 11:57:41 2013 +0100
summary: [CP-4195] Add README.md and associated files to xennet
changeset: 99:a99774724570
user: Owen Smith <owen.smith@citrix.com>
date: Wed Jun 12 16:25:16 2013 +0100
summary: update vcxproj files to correctly build when targetting Vista
changeset: 98:b037ead6effc
user: Owen Smith <owen.smith@citrix.com>
date: Tue Jun 11 15:02:23 2013 +0100
summary: [CA-86240] Add sdv.py and supporting vcxproj changes
changeset: 97:142f3075f24f
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:56:28 2013 +0100
summary: Fix line endings
changeset: 96:7c1e5962d8d5
parent: 95:34f993bf0d23
parent: 94:567bcf20ab51
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:55:47 2013 +0100
summary: Merge
changeset: 95:34f993bf0d23
parent: 88:b28ade43dab8
user: Paul Durrant <paul.durrant@citrix.com>
date: Thu Jun 06 12:54:55 2013 +0100
summary: Fix up some names to be clearer
changeset: 94:567bcf20ab51
user: Ben Chalmers <ben.chalmers@citrix.com>
date: Wed May 29 16:19:28 2013 +0100
summary: [CP-4688] Add BSD licence header to inf file