]> xenbits.xensource.com Git - pvdrivers/win/xennet.git/log
pvdrivers/win/xennet.git
8 years agoMake free builds of XENNET less chatty
Paul Durrant [Mon, 15 Aug 2016 13:08:26 +0000 (14:08 +0100)]
Make free builds of XENNET less chatty

Refine logging of offload options and turn the Info() calls into Trace()
calls. Also add similar Trace() calls for RSS settings.

While doing this re-factoring, this patch also breaks out link state logging
into a dedicated function.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRe-instate code network settings code in the co-installer
Paul Durrant [Thu, 11 Aug 2016 14:56:47 +0000 (15:56 +0100)]
Re-instate code network settings code in the co-installer

This functionality was moved into XENVIF when it transpired that it did not
work with Windows 10. However, attempting to mess with network settings in
a driver has also proved to have problematic corner cases.

This patch re-instates old code but changes the mechnism for acquiring
network settings from an emulated device. Instead of attempting to copy
settings to a new stack binding (which failed on Windows 10 because the
stack binding was not set up), the stack binding of the emulated device is
cloned. This is done in post-install phase if the emulated device is online
(otherwise Windows will refuse to start the PV device) or in pre-install
phase if the emulated device is offline, as is the case when re-installing
XENNET. This appears to work reliably across all variants of Windows.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRemove code to clear stolen stack binding
Paul Durrant [Mon, 8 Aug 2016 12:14:59 +0000 (13:14 +0100)]
Remove code to clear stolen stack binding

This is now handled internally by XENVIF.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFix VS2012 builds
Paul Durrant [Tue, 26 Jul 2016 08:22:37 +0000 (09:22 +0100)]
Fix VS2012 builds

Building for OS earlier than Windows 7 now requires use of procgrp.lib
since KeGetCurrentProcessorEx() is used. Since the base OS of VS2012 builds
is Vista, these have been failing since commit 8cb5c156.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRemove reboot request from the co-installer
Paul Durrant [Thu, 21 Jul 2016 11:04:31 +0000 (12:04 +0100)]
Remove reboot request from the co-installer

This is now taken care of by XENVIF by way of the XENBUS_MONITOR service.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd missing names to the INF file
Paul Durrant [Thu, 21 Jul 2016 10:57:29 +0000 (11:57 +0100)]
Add missing names to the INF file

The package should have a name and the XENVIF driver should also have a
DisplayName.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAvoid lock contention between receiving CPUs
Paul Durrant [Thu, 19 May 2016 11:28:04 +0000 (12:28 +0100)]
Avoid lock contention between receiving CPUs

The single PutList/GetList for cached NET_BUFFER_LIST structures is
currently a point of contention. This patch gets rid of the contention
by keeping per-CPU GetLists.

To access the definition of HVM_MAX_VCPUS, the hvm_info_table.h header
needs to be pulled in the from the Xen source base. This patch therefore
adds the infrastructure for pulling in Xen headers.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd support for NDIS RSS
Paul Durrant [Wed, 3 Feb 2016 10:49:22 +0000 (10:49 +0000)]
Add support for NDIS RSS

Update to VIF interface version 6 and make use of the extra functionality
provided to support NDIS RSS.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoClear stolen linkage on device removal
Paul Durrant [Fri, 4 Mar 2016 11:10:33 +0000 (11:10 +0000)]
Clear stolen linkage on device removal

Commit 04c391d9 "Replace copying network settings with identity stealing" to
XENVIF changed the way that network settings are preserved when replacing
an emulated NIC with a PV network device. This change means that both the
emulated NIC and PV device have the same binding to the Windows network
stack. Thus, if we do not destroy that binding prior to uninstallation of
the PV network driver, the stack will be torn down by the network class
uninstall code rather than left in place for the emulated NIC to use after
reboot.

This patch hence adds code to the XENNET co-installer to remove stolen
linkage information from the registry in the pre-remove phase.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoBootFlags should be a parameter, not a subkey
Paul Durrant [Wed, 30 Mar 2016 11:01:26 +0000 (12:01 +0100)]
BootFlags should be a parameter, not a subkey

A misplaced comma in the INF file means that BootFlags is being created as
a subkey under the service key with a default DWORD value, rather than a
DWORD value with the name 'BootFlags'.

This patch moves the comma and fixes the problem.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoGet rid of InitSafeBootMode veto
Paul Durrant [Tue, 1 Mar 2016 16:53:52 +0000 (16:53 +0000)]
Get rid of InitSafeBootMode veto

This should no longer be necessary since XENVIF fails to start PDOs if
emulated devices are present, which they will be in safe mode.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix a typo that causes 'low resources' to erroneously kick in
Paul Durrant [Wed, 24 Feb 2016 10:35:12 +0000 (10:35 +0000)]
Fix a typo that causes 'low resources' to erroneously kick in

This patch fixes a typo which caused XENNET to operate in a 'low resources'
situation most of the time. This was almost certainly causing performance
issues and, oddly, caused the NDISTest 6.5 OffloadChecksum test to fail...
but only on Windows 8.0.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix a warning in the NDISTest 6.0 2c_OidsNdisRequest test
Paul Durrant [Mon, 1 Feb 2016 15:45:14 +0000 (15:45 +0000)]
Fix a warning in the NDISTest 6.0 2c_OidsNdisRequest test

The format of the response to the OID_GEN_VENDOR_DRIVER_VERSION request was
incorrect, and also the OID_GEN_DRIVER_VERSION response has been lying since
the change to NDIS 6.1.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix NDISTest 6.5 OffloadLSO test
Paul Durrant [Mon, 1 Feb 2016 11:06:03 +0000 (11:06 +0000)]
Fix NDISTest 6.5 OffloadLSO test

There are more structure size issues lurking that cause this logo test to
fail. This patch fixes those, others that were found along the way and also
makes sure that any attempt to set IPsecV2 offload parameters fails (since
it is not supported).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUse a locally defined StringPrintf
Paul Durrant [Thu, 28 Jan 2016 17:59:26 +0000 (17:59 +0000)]
Use a locally defined StringPrintf

Use of the _snprintf_s symbol fails on Windows 10, where it appears not to
be exported from ntdll. So, for portability's sake it is more robust to
implement a StringPrintf function locally.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoStash a pointer to _snprintf_s in the ADAPTER structure
Paul Durrant [Thu, 28 Jan 2016 09:57:24 +0000 (09:57 +0000)]
Stash a pointer to _snprintf_s in the ADAPTER structure

It is problematic if we don't, as on resume from suspend we need to
re-acquire the function pointer and this seems to lead to a BSOD, despite
there being no documentation to suggest that use of the aux_klib functions
at DISPATCH_LEVEL is disallowed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoStop using RtlStringCbPrintfA()
Paul Durrant [Wed, 27 Jan 2016 14:52:57 +0000 (14:52 +0000)]
Stop using RtlStringCbPrintfA()

It appears that linking an NDIS driver with any ntstrsafe function (when
building with VS2012 and the 8.0 WDK at least) has the side effect of
requiring use of DbgPrint(). Whilst this may not sound like a problem, it
is. This is because the NDISTest 6.0 1c_KernelCalls test insists that any
use of DbgPrint is illegal and so it's impossible to logo an NDIS driver
using ntstrsafe functions.

This patch works around the issue by dynamically linking (at run-time) to
the ntdll _snprintf_s function as a replacement for calls to
RtlStringCbPrintfA(). This entails importing the dynamic linking code from
XENVIF since MmGetSystemRoutineAddress() doesn't seem to work for that
symbol.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix multiple completion vulnerability in transmit code
Paul Durrant [Tue, 26 Jan 2016 11:34:47 +0000 (11:34 +0000)]
Fix multiple completion vulnerability in transmit code

My previous patch 7c3365d5 "Make transmitter robust against a possible
completion race" did not fix the problem. There is still the possibility
that a NET_BUFFER_LIST containing multiple NET_BUFFERs could lead to
multiple completions if the underlying transmit completes quickly (or indeed
synchrnously). This is because a reference is taken before sending each
NET_BUFFER but, if that transmission completes immediately the reference is
dropped back to zero (leading to the NET_BUFFER_LIST being completed) before
the reference is taken for the next NET_BUFFER.

This patch therefore takes an extra reference before sending any NET_BUFFERs
and then drops it when there are no more NET_BUFFERs to send. This ensures
that the reference count on the NET_BUFFER_LIST can only fall to zero once
the whole thing has been processed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAvoid evaluating assertion expressions in free builds
Paul Durrant [Fri, 22 Jan 2016 16:05:40 +0000 (16:05 +0000)]
Avoid evaluating assertion expressions in free builds

The evaluations are pointless and the warnings generated by not evaluating
can be squashed with a couple of #pragmas.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMake transmitter robust against a possible completion race
Paul Durrant [Tue, 19 Jan 2016 11:21:28 +0000 (11:21 +0000)]
Make transmitter robust against a possible completion race

It's possible that a transmission invoked on one CPU may complete on another
before the transmission invocation as finished. Therefore, once we have queued
a NET_BUFFER for transmission we should not use it's metadata again (including
the 'next' pointer).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove header/data split support
Paul Durrant [Tue, 19 Jan 2016 09:31:45 +0000 (09:31 +0000)]
Remove header/data split support

During logo testing it became apparent that:

a) This is predicated on support VLAN ID, which is not something we really
   want in a PV driver (since the backend network may actually be a VLAN).
b) Turning on Viridian flags causes NDIS to stop enabling header/data split.
   (There's a call to NdisGetHypervisorInfo() in NdisMSetHDSplitAttributes()).

Issue a) makes it undesirable to implement and b) makes it pretty much
pointless having the code around. Hence this patch removes it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix various structure sizes
Paul Durrant [Mon, 18 Jan 2016 17:44:01 +0000 (17:44 +0000)]
Fix various structure sizes

NDIS defines 'sizeof' values for various attribute/parameter structures
which are documented for use with different versions of NDIS. This patch
makes sure we are using these defined values in appropriate places.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUpdate to correct PDO revision
Paul Durrant [Mon, 4 Jan 2016 13:37:48 +0000 (13:37 +0000)]
Update to correct PDO revision

The correct PDO revision for the latest VIF interface is 0x08000009, not
0x08000007.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUpdate to VIF interface version 5
Paul Durrant [Mon, 4 Jan 2016 13:16:38 +0000 (13:16 +0000)]
Update to VIF interface version 5

Use version 5 of the interface to avoid the shutdown race present in
version 4.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRe-synchronize util.h with XENBUS and use __toupper()
Paul Durrant [Thu, 10 Dec 2015 11:28:17 +0000 (11:28 +0000)]
Re-synchronize util.h with XENBUS and use __toupper()

A recent patch introduced __tolower() and __toupper() into util.h as
replacements for tolower() and toupper() respectively as the latter do
a hidden conversion to Unicode which make then unsafe at any IRQL other
than PASSIVE_LEVEL.
This patch imports util.h from XENBUS and fixes other code to be compatible.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoDon't get XENBUS_SUSPEND callback registration on AdapterCount
Paul Durrant [Tue, 8 Dec 2015 15:06:51 +0000 (15:06 +0000)]
Don't get XENBUS_SUSPEND callback registration on AdapterCount

Instances will not necessarily come and go in order so we can't know that
the last instance to go will be the one the registered the callback.
Instead register a callback for every instance and just use AdapterCount to
decide which instance writes distribution information to xenstore.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMove to XENVIF VIF interface version 4
Paul Durrant [Fri, 4 Dec 2015 12:22:08 +0000 (12:22 +0000)]
Move to XENVIF VIF interface version 4

This means we can remove a lot of complexity and crucially we no longer
need to use the XENBUS_CACHE interface, which means we can avoid the race
introduced by commit 026aa32c "Make sure XENBUS interfaces are released
when going into S4".

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMake sure XENBUS interfaces are released when going into S4
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>
9 years agoFix another SDV stupidity
Paul Durrant [Wed, 25 Nov 2015 14:39:54 +0000 (14:39 +0000)]
Fix another SDV stupidity

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd two missing headers
Paul Durrant [Wed, 25 Nov 2015 14:06:34 +0000 (14:06 +0000)]
Add two missing headers

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix SDV build
Paul Durrant [Wed, 25 Nov 2015 13:57:13 +0000 (13:57 +0000)]
Fix SDV build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoPublish distribution information to xenstore
Paul Durrant [Tue, 24 Nov 2015 15:41:10 +0000 (15:41 +0000)]
Publish distribution information to xenstore

My recent patch series to Xen added a documented path and format for
publishing information about PV driver distributions to xenstore.

This patch adds code to populate the documented path (should it exist)
with information about the XENNET driver package.

Suggested-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd a registry override to veto driver installations
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>
9 years agoChange coinstaller log level to TXTLOG_WARNING
Paul Durrant [Thu, 22 Oct 2015 13:53:05 +0000 (14:53 +0100)]
Change coinstaller log level to TXTLOG_WARNING

Windows 10 does not enable logging of TXTLOG_DETAILS in setupapi.dev.log by
default, so use TXTLOG_WARNING to make sure the messages appear.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd header/data split support
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>
9 years agoUpdate to NDIS 6.1
Paul Durrant [Mon, 27 Jul 2015 17:25:24 +0000 (18:25 +0100)]
Update to NDIS 6.1

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoParameterize vendor prefix and PCI device id
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>
9 years agoUpdate to 8.2.0
Paul Durrant [Fri, 4 Sep 2015 15:17:14 +0000 (16:17 +0100)]
Update to 8.2.0

I also removed CHANGELOG as it's pretty useless and will likely become
misleading.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix typo that breaks SDV build 8.1.0-rc1
Paul Durrant [Fri, 7 Aug 2015 13:06:23 +0000 (14:06 +0100)]
Fix typo that breaks SDV build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoThe NDIS_WDM flag should be set
Paul Durrant [Mon, 27 Jul 2015 16:58:06 +0000 (17:58 +0100)]
The NDIS_WDM flag should be set

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUse the miniport source module for what it was intended
Paul Durrant [Mon, 27 Jul 2015 09:36:46 +0000 (10:36 +0100)]
Use the miniport source module for what it was intended

The miniport registration code and entry points should not be in driver.c

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUpdate docs and set version to 8.1.0
Paul Durrant [Fri, 24 Jul 2015 11:50:41 +0000 (12:50 +0100)]
Update docs and set version to 8.1.0

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove redundant code from dbg_print.h
Paul Durrant [Thu, 23 Jul 2015 11:15:50 +0000 (12:15 +0100)]
Remove redundant code from dbg_print.h

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoWe no longer need to set the friendly name in the co-installer
Paul Durrant [Wed, 22 Jul 2015 15:50:01 +0000 (16:50 +0100)]
We no longer need to set the friendly name in the co-installer

This is now handled by XENVIF.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove use of interface subscription keys and unplug key
Paul Durrant [Fri, 17 Jul 2015 15:50:14 +0000 (16:50 +0100)]
Remove use of interface subscription keys and unplug key

Neither of these are required any more.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUpdate bindings
Paul Durrant [Wed, 8 Jul 2015 13:21:17 +0000 (14:21 +0100)]
Update bindings

Add the XENVIF major version into the top byte of the revision, since this
is now used to avoid namespace conflicts.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove code that copies network settings from the co-installer
Paul Durrant [Wed, 8 Jul 2015 12:25:33 +0000 (13:25 +0100)]
Remove code that copies network settings from the co-installer

This functionality is now implemented by XENVIF.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoCo-installer RequestReboot() invocation changes
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>
10 years agoUse a single locked receiver GetList
Paul Durrant [Tue, 24 Mar 2015 13:30:09 +0000 (13:30 +0000)]
Use a single locked receiver GetList

This avoids the need for any reference to the current CPU or need for
MAXIMUM_PROCESSOR sized array.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRevert previous commit
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>
10 years agoMake XENNET processor group aware
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>
10 years agoAdd back useful information logging that was removed
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>
10 years agoOID handling improvements
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>
10 years agoFix NDISTest PacketFilters test
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>
10 years agoFix CHANGE macro
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>
10 years agoSet script file execute permissions
Paul Durrant [Thu, 12 Mar 2015 11:35:35 +0000 (11:35 +0000)]
Set script file execute permissions

The lack of execute persmission causes clones done using cygwin git to
leave scripts in a non-executable state.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years ago64bit OIDs: 4-byte results are a success
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

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoFix VS2013 SDV failures
Paul Durrant [Mon, 2 Mar 2015 16:24:52 +0000 (16:24 +0000)]
Fix VS2013 SDV failures

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoNDIS6.0 1c_64bitOIDs / 1c_IOCTLCoverage
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.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoCalculate simple hash of IP/Ports
Owen Smith [Thu, 18 Dec 2014 16:54:33 +0000 (16:54 +0000)]
Calculate simple hash of IP/Ports

Pullup the packet headers into a cached buffer, and calculate
a simple hash over the Source/Destination IP Addresses and Ports.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoSwitch to VIF interface V2
Owen Smith [Thu, 18 Dec 2014 16:54:32 +0000 (16:54 +0000)]
Switch to VIF interface V2

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoQuery for cache interface
Owen Smith [Thu, 18 Dec 2014 16:54:31 +0000 (16:54 +0000)]
Query for cache interface

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoRefactor for more maintainability.
Owen Smith [Thu, 18 Dec 2014 16:54:30 +0000 (16:54 +0000)]
Refactor for more maintainability.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Add missing file

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove interface registration to coinstaller
Owen Smith [Thu, 18 Dec 2014 16:54:29 +0000 (16:54 +0000)]
Move interface registration to coinstaller

WHQL will fail when registry is accessed from NDIS drivers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoFix line endings
Paul Durrant [Fri, 19 Dec 2014 17:08:12 +0000 (17:08 +0000)]
Fix line endings

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMake sure INF gets re-built each time
Paul Durrant [Fri, 19 Dec 2014 15:44:45 +0000 (15:44 +0000)]
Make sure INF gets re-built each time

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMake sure version header gets re-built each time
Paul Durrant [Fri, 19 Dec 2014 13:04:06 +0000 (13:04 +0000)]
Make sure version header gets re-built each time

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to latest XENVIF interface
Paul Durrant [Fri, 7 Nov 2014 17:23:21 +0000 (17:23 +0000)]
Update to latest XENVIF interface

No functional change, just better documented.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoHandle lack of IPv6 registry keys in co-installer
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>
10 years agoReduce spam from build.py
Paul Durrant [Thu, 25 Sep 2014 15:17:01 +0000 (16:17 +0100)]
Reduce spam from build.py

We don't the verbose prints when deciding whether we're using vs2012 or 2013.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoDon't use universal_newlines=True in subprocess.Popen()
Paul Durrant [Thu, 25 Sep 2014 14:06:31 +0000 (15:06 +0100)]
Don't use universal_newlines=True in subprocess.Popen()

For some versions of python this appears to cause corruption of the
output byte string by forcibly decoding with the wrong encoding.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMark xennet.sys as boot-critical to simplify offline installation
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>
10 years agoAdd support for Visual Studio 2013 & WDK 8.1
Ben Chalmers [Thu, 28 Aug 2014 08:16:26 +0000 (09:16 +0100)]
Add support for Visual Studio 2013 & WDK 8.1

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate branding
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>
10 years agoImplement new API version scheme
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>
11 years agoHandle SDV scan and refine
Paul Durrant [Tue, 15 Apr 2014 16:34:24 +0000 (17:34 +0100)]
Handle SDV scan and refine

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoBuild/SDV refinements
Paul Durrant [Tue, 15 Apr 2014 13:44:50 +0000 (14:44 +0100)]
Build/SDV refinements

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #13 from pauldu/sdv
Ben Chalmers [Tue, 18 Mar 2014 09:46:22 +0000 (09:46 +0000)]
Merge pull request #13 from pauldu/sdv

Add SDV to the standard build

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoAdd SDV to the standard build
Paul Durrant [Fri, 14 Mar 2014 16:45:55 +0000 (17:45 +0100)]
Add SDV to the standard build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #12 from pauldu/master
Ben Chalmers [Fri, 14 Mar 2014 11:24:16 +0000 (11:24 +0000)]
Merge pull request #12 from pauldu/master

Couple of simple patches...

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoFix a double-free and add more logging in the co-installer
Paul Durrant [Thu, 13 Mar 2014 17:45:38 +0000 (18:45 +0100)]
Fix a double-free and add more logging in the co-installer

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix several build warnings
Paul Durrant [Thu, 13 Mar 2014 16:48:47 +0000 (17:48 +0100)]
Fix several build warnings

Signed-off-by: Murtaza Ghiya <murtazg@amazon.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #11 from pauldu/master
Paul Durrant [Fri, 10 Jan 2014 12:27:18 +0000 (04:27 -0800)]
Merge pull request #11 from pauldu/master

Update to latest xenvif interface

11 years agoUpdate to latest xenvif interface
Paul Durrant [Fri, 10 Jan 2014 10:37:59 +0000 (10:37 +0000)]
Update to latest xenvif interface

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #10 from pauldu/master
Paul Durrant [Mon, 23 Dec 2013 17:14:10 +0000 (09:14 -0800)]
Merge pull request #10 from pauldu/master

Fix problem of adding device without alias

11 years agoFix problem of adding device without alias
Paul Durrant [Mon, 23 Dec 2013 17:13:11 +0000 (17:13 +0000)]
Fix problem of adding device without alias

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #9 from pauldu/master
Paul Durrant [Mon, 23 Dec 2013 15:57:47 +0000 (07:57 -0800)]
Merge pull request #9 from pauldu/master

Find alias hardware key rather then stopping with the software key

11 years agoFind alias hardware key rather then stopping with the software key
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>
11 years agoMerge pull request #8 from pauldu/master
Ben Chalmers [Mon, 9 Dec 2013 13:19:01 +0000 (05:19 -0800)]
Merge pull request #8 from pauldu/master

Two fixes

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoUpdate to latest VIF interface
Paul Durrant [Mon, 25 Nov 2013 17:21:25 +0000 (17:21 +0000)]
Update to latest VIF interface

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix crash in co-installer
Paul Durrant [Mon, 25 Nov 2013 17:21:06 +0000 (17:21 +0000)]
Fix crash in co-installer

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #7 from benchalmers/ca-119963-3
Paul Durrant [Thu, 31 Oct 2013 11:50:31 +0000 (04:50 -0700)]
Merge pull request #7 from benchalmers/ca-119963-3

[CA-119963] Copy static IPv6 address set by installer

11 years ago[CA-119963] Copy static IPv6 address set by installer
Ben Chalmers [Thu, 31 Oct 2013 08:57:37 +0000 (08:57 +0000)]
[CA-119963] Copy static IPv6 address set by installer

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>
11 years agoMerge pull request #5 from benchalmers/upstream-cp-118428
Paul Durrant [Tue, 15 Oct 2013 14:49:45 +0000 (07:49 -0700)]
Merge pull request #5 from benchalmers/upstream-cp-118428

[CA-118428] Return a success when copying registry entries succeeds

11 years ago[CA-118428] Return a success when copying registry entries succeeds
Ben Chalmers [Tue, 15 Oct 2013 14:13:04 +0000 (15:13 +0100)]
[CA-118428] Return a success when copying registry entries succeeds

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>
11 years agoMerge pull request #4 from benchalmers/upstream-cp6209-3
Paul Durrant [Fri, 11 Oct 2013 10:12:36 +0000 (03:12 -0700)]
Merge pull request #4 from benchalmers/upstream-cp6209-3

[CP-6629] Copy installer keys from registry to newly installed device

11 years ago[CP-6629] Copy installer keys from registry to newly installed device
Ben Chalmers [Fri, 11 Oct 2013 07:51:13 +0000 (08:51 +0100)]
[CP-6629] Copy installer keys from registry to newly installed device

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>
11 years agoFix a cut'n'paste error and clarify a point.
Paul Durrant [Tue, 1 Oct 2013 13:03:26 +0000 (14:03 +0100)]
Fix a cut'n'paste error and clarify a point.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoNew README.md and INSTALL.md.
Paul Durrant [Tue, 1 Oct 2013 13:00:23 +0000 (14:00 +0100)]
New README.md and INSTALL.md.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoUpdate build to reflect version
Paul Durrant [Fri, 27 Sep 2013 12:55:49 +0000 (13:55 +0100)]
Update build to reflect version

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>