]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/log
pvdrivers/win/xenvif.git
9 years agoStop synthesizing the NET_LUID
Paul Durrant [Wed, 8 Jul 2015 10:53:42 +0000 (11:53 +0100)]
Stop synthesizing the NET_LUID

From Windows 10 the lifetime of the registry keys used to synthesize the
PDO's NET_LUID has changed. Instead of using a synthesized NET_LUID, look it
up in the MIB interface table (keyed by the permanent physical address)

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMove reboot request code into driver.c
Paul Durrant [Wed, 8 Jul 2015 10:16:13 +0000 (11:16 +0100)]
Move reboot request code into driver.c

It doesn't really belong in pdo.c

Also this patch adds a check in PdoStartDevice() to fail if a reboot has
already been requested. This is because Windows 10 apparently has a couple
of goes at starting the PDO even after it failed to start the first time
(because we requested a reboot).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoOnly open the PDO software key once
Paul Durrant [Tue, 7 Jul 2015 13:42:46 +0000 (14:42 +0100)]
Only open the PDO software key once

There are currently two functions where the PDO software key is opened and
closed: __PdoSetCurrentAddress() and __PdoSetLuid(). Both of these
functions are called from PdoStartDevice() so it's more efficient to open
the software key there and pass it as an argument to the aforementioned
functions.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoInfer REG_SZ or REG_MULTI_SZ type in RegistryUpdateSzValue()
Paul Durrant [Tue, 7 Jul 2015 14:03:12 +0000 (15:03 +0100)]
Infer REG_SZ or REG_MULTI_SZ type in RegistryUpdateSzValue()

The argument is a pointer to an array of ANSI_STRINGs in both cases so the
type can easily be inferred from the length of the array.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd a type argument to the RegistryEnumerateValues() callback...
Paul Durrant [Tue, 7 Jul 2015 13:56:17 +0000 (14:56 +0100)]
Add a type argument to the RegistryEnumerateValues() callback...

...and pass ANSI_STRINGs rather than PCHARs.

Also fix both RegistryEnumerateSubKeys() and RegistryEnumerateValues() to
not clobber their own buffer sizes when calling ZwEnumerateKey() or
ZwEnumerateValueKey() respectively.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd functions to query and update binary values in the registry
Paul Durrant [Tue, 7 Jul 2015 13:52:18 +0000 (14:52 +0100)]
Add functions to query and update binary values in the registry

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove use of 'Addresses' subkey
Paul Durrant [Tue, 7 Jul 2015 10:44:53 +0000 (11:44 +0100)]
Remove use of 'Addresses' subkey

XENVIF writes the permanent address of each vif into a subkey under its
service key. This is done to allow XENNET's co-installer to copy network
settings from any emulated device that currently has that address.

As of Windows 10, this functionality cannot be provided by a co-installer
and so this subkey has become useless. Hence this patch removes its use.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove erroneous use of transmitter DPC
Paul Durrant [Thu, 2 Jul 2015 10:31:29 +0000 (11:31 +0100)]
Remove erroneous use of transmitter DPC

If the backend does not support split event channels then the transmitter
DPC should not be used, and it contains an assertion to that effect.
The ring enable function, however, unconditionally queues the DPC leading
to an assertion failure. This patch makes sure the DPC is only queued if
the backend does indeed support split event channels.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoDispense with long PDO descriptions
Paul Durrant [Wed, 1 Jul 2015 16:32:51 +0000 (17:32 +0100)]
Dispense with long PDO descriptions

Windows does not present them well and they are somewhat ugly. The relation-
ship between interface versions and PDO revision is now simply logged.

Also this patch applies appropriate limits to the HardwareIDs and
CompatibleIDs.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRelease and re-acquire backend on resume
Paul Durrant [Fri, 8 May 2015 14:40:50 +0000 (15:40 +0100)]
Release and re-acquire backend on resume

When resuming from suspend, any previously cached backend domid and path are
invalid. The frontend code should therefore release and re-acquire those
values before attempting to manipulate vif state.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix Trace statement
Paul Durrant [Tue, 21 Apr 2015 12:32:15 +0000 (13:32 +0100)]
Fix Trace statement

This can cause a crash in checked builds

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRe-work frontend xenbus state handling code
Paul Durrant [Thu, 16 Apr 2015 11:45:57 +0000 (12:45 +0100)]
Re-work frontend xenbus state handling code

Any time the xenbus state transitions through XenbusStateClosed (6) then
it's possible for the toolstack to tear down the vif, regardless of whether
the state transition was initialiated by the backend going offline or the
frontend being disabled at the same time the backend happens to go offline.
It's important, therefore, that the frontend code allows for this and
always requests PDO ejection if the backend does go away (even if a new
immediately appears).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoDemote the link Info message to a Trace
Paul Durrant [Thu, 16 Apr 2015 11:56:48 +0000 (12:56 +0100)]
Demote the link Info message to a Trace

It doesn't really need to go into the log

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove excessive force-inlining from the frontend module
Paul Durrant [Wed, 15 Apr 2015 15:30:19 +0000 (16:30 +0100)]
Remove excessive force-inlining from the frontend module

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAllow PdoResume() to fail
Paul Durrant [Wed, 15 Apr 2015 15:10:08 +0000 (16:10 +0100)]
Allow PdoResume() to fail

At the moment FrontendResume() can fail, but PdoResume() cannot and hence
the error status is ignored. This is problematic because it is not safe to
call FrontendSuspend() if FrontendResume() did not complete successfully.
This patch, therefore, wires through the failure of FrontendResume() into
PdoResume() and on into FdoAddPhysicalDeviceObject().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove excessive force-inlining from co-installer
Paul Durrant [Wed, 1 Apr 2015 16:17:35 +0000 (17:17 +0100)]
Remove excessive force-inlining from co-installer

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoLog a message to note that when a receiver is waiting for packets
Paul Durrant [Wed, 1 Apr 2015 14:32:54 +0000 (15:32 +0100)]
Log a message to note that when a receiver is waiting for packets

Before the receiver object in the frontend can be shut down, the Windows
network stack must return all buffers passed up. The code therefore
waits for this to happen during the VIF Disable method. Add logging to
note that the wait is occuring as it can take a significant amount of time.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoPing the transmitter backend when trying to disable
Paul Durrant [Wed, 1 Apr 2015 14:28:29 +0000 (15:28 +0100)]
Ping the transmitter backend when trying to disable

Any transmit requests which have been pushed to the backend must be
responded to before the frontend shuts down, otherwise the frontend
cannot safely tear down the shared ring structures. Whilst waiting
for the backend to respond, send events to make sure it is awake.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix a couple of ASSERT failures
Paul Durrant [Tue, 24 Mar 2015 17:50:53 +0000 (17:50 +0000)]
Fix a couple of ASSERT failures

The multi-processor-group patch introduced a new statistics array in
the Frontend object. Unfortunately, whilst the array is correctly freed
on object destruction, the pointer is not NULL-ed out so the IsZeroMemory
check fails. This patch adss the ncessary lines to NULL the array pointer.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAdd the 'NeedReboot' flag back in
Paul Durrant [Tue, 24 Mar 2015 12:18:59 +0000 (12:18 +0000)]
Add the 'NeedReboot' flag back in

Older versions of the code used to set a 'NeedReboot' registry value if
the PDO failed to start because the corresponding emulated device was
found to be still present. The value was set directly in the service key
which is non-volatile and thus the value would persist after reboot.

This patch adds code to again set a 'NeedReboot' value, but this time it
is in a volatile 'Status' key under the service key so that it does not
persist. This value can then be used by the XENNET co-installer to
determine whether it should request a reboot during postinstall
processing.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix typos and type problems in previous patch
Paul Durrant [Tue, 24 Mar 2015 10:03:09 +0000 (10:03 +0000)]
Fix typos and type problems in previous patch

Also add some extra trace statements that proved useful in debugging

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMake XENVIF processor group aware
Paul Durrant [Fri, 20 Mar 2015 12:01:47 +0000 (12:01 +0000)]
Make XENVIF 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 agoFix various bits of (largely autogen) stupidity in vcxproj files
Paul Durrant [Fri, 20 Mar 2015 11:48:30 +0000 (11:48 +0000)]
Fix various bits of (largely autogen) stupidity in vcxproj files

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate headers to xen.git:f919dbc0583797d1c5c09da815518084ce77eb81
Paul Durrant [Fri, 20 Mar 2015 11:20:24 +0000 (11:20 +0000)]
Update headers to xen.git:f919dbc0583797d1c5c09da815518084ce77eb81

This brings the headers into line with XENBUS. There's no reliance on a
post-4.5.0 change in XENVIF but the re-structuring in the headers done
after 4.5.0 does mean change is necessary and we may as well take the pain
sooner rather than later.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix line endings
Paul Durrant [Fri, 20 Mar 2015 10:01:28 +0000 (10:01 +0000)]
Fix line endings

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove util.h from include to src/xenvif
Paul Durrant [Fri, 20 Mar 2015 09:59:07 +0000 (09:59 +0000)]
Move util.h from include to src/xenvif

It should be co-located with headers such as assert.h and names.h

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoDisambiguate transmitter packet caches
Paul Durrant [Fri, 13 Mar 2015 16:00:16 +0000 (16:00 +0000)]
Disambiguate transmitter packet caches

When a VM has multiple VIFs then it is not currently possible to tell
which transmitter packet cache applies to which VIF. This patch adds
the VIF path into the cache name to disambiguate.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoSet script file execute permissions
Paul Durrant [Thu, 12 Mar 2015 11:29:26 +0000 (11:29 +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 agoGet rid of Granter abstraction
Paul Durrant [Mon, 9 Mar 2015 15:02:09 +0000 (15:02 +0000)]
Get rid of Granter abstraction

Since the addition of GNTTAB Caches in XENBUS, the Granter abstraction in
XENVIF has been fairly pointless. This patch finally gets rid of it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix memory leak
Paul Durrant [Thu, 5 Mar 2015 09:56:38 +0000 (09:56 +0000)]
Fix memory leak

Verifier discovered a memory leak on shutdown of XENVIF. This is because
the per-ring path used for talking to multi-queue aware backends is not
freed in the case where there is only one queue. This patch simply removes
that check as it is incorrect.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix WHQL induced BSODs
Paul Durrant [Wed, 4 Mar 2015 10:04:58 +0000 (10:04 +0000)]
Fix WHQL induced BSODs

The PNP Rebalance Fail Restart Device test causes BSODs due to incorrect
PnP state assumptions about the FDO. This patch fixes these problems
allowing the test to pass.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix VS2013 SDV failures
Paul Durrant [Mon, 2 Mar 2015 15:45:24 +0000 (15:45 +0000)]
Fix VS2013 SDV failures

The code in registry.c needs the same prefast suppression as it does in
XENBUS.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRelease lower bus interface before passing removal IRP to PDO
Paul Durrant [Fri, 27 Feb 2015 17:47:04 +0000 (17:47 +0000)]
Release lower bus interface before passing removal IRP to PDO

If the PDO is surprised removed then the FDO tries to retain its
reference to the PDO's bus interface byond its destruction. This will
cause an assertion failure in checked builds of XENBUS and may cause
memory corruption.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to EVTCHN version 3
Paul Durrant [Tue, 3 Feb 2015 14:02:02 +0000 (14:02 +0000)]
Update to EVTCHN version 3

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoA single queue to the backend should imply and index of 0
Paul Durrant [Tue, 3 Feb 2015 10:20:55 +0000 (10:20 +0000)]
A single queue to the backend should imply and index of 0

There is no need to test for both so change the extra test into an
assertion.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix type mismatch
Paul Durrant [Mon, 26 Jan 2015 16:15:24 +0000 (16:15 +0000)]
Fix type mismatch

The size of PWCHAR and the size of ULONG are the same for 32-bit
installations so this bug only affects 64-bit installations, but the
symptom is a crash on PDO destruction due to a corrupted heap.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix memory leak in __LinkGetImageBase()
Kostas Ladopoulos [Thu, 22 Jan 2015 15:16:48 +0000 (15:16 +0000)]
Fix memory leak in __LinkGetImageBase()

The in-function allocated QueryInfo object was correctly freed for all error
cases, but not the successful one.

Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com>
10 years agoUse correct location when multi-queues are not used.
Owen Smith [Mon, 19 Jan 2015 16:23:39 +0000 (16:23 +0000)]
Use correct location when multi-queues are not used.

When the backend does not support multi-queues, or the frontend has
explicitly disallowed multi-queues, the frontend needs to write
event-channel and ring-references to the non-queued (old) locations,
not under device/vif/<id>/queue-<index>

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoReflect interface versions in PDO description
Paul Durrant [Mon, 12 Jan 2015 17:35:43 +0000 (17:35 +0000)]
Reflect interface versions in PDO description

For convenience add a string containing the latest versions of all the
interfaces exported by the driver into the PDO description. This can be
seen in Device Manager as the 'Bus reported device description' detail.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove interface subscription code into co-installer
Paul Durrant [Mon, 12 Jan 2015 14:37:32 +0000 (14:37 +0000)]
Move interface subscription code into co-installer

Interface subscription is better handled at package installation time and
therefore the co-installer is the right place for it to live.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoImplement multiple queues
Owen Smith [Thu, 18 Dec 2014 14:28:24 +0000 (14:28 +0000)]
Implement multiple queues

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoImplement VIF Interface v2
Owen Smith [Thu, 18 Dec 2014 14:28:23 +0000 (14:28 +0000)]
Implement VIF Interface v2

Use VIF v2 structures internally, and add translation layer
for VIF v1 calls.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate to VIF Interface v2
Owen Smith [Thu, 18 Dec 2014 14:28:22 +0000 (14:28 +0000)]
Update to VIF Interface v2

Renames XENVIF_TRANSMITTER_PACKET to XENVIF_TRANSMITTER_PACKET_V1 and
adds XENVIF_TRANSMITTER_PACKET_V2 for future patches.
VIF v2 will be implemented in another patch.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove notifier object
Owen Smith [Thu, 18 Dec 2014 14:28:21 +0000 (14:28 +0000)]
Remove notifier object

Fold event channels into transmitter/receiver ring objects.
Receiver ring object takes over single event channel case and passes
notifications to transmitter object, tagged with ring index (so that
only the specified ring is executed).
Split notifications are handled independently by each ring object.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMove to receiver ring pointer array
Owen Smith [Thu, 18 Dec 2014 14:28:20 +0000 (14:28 +0000)]
Move to receiver ring pointer array

Replace the list of rings with a maximally sized array of pointers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMove to transmitter ring pointer array
Owen Smith [Thu, 18 Dec 2014 14:28:19 +0000 (14:28 +0000)]
Move to transmitter ring pointer array

Replace the list of rings with a maximally sized array of pointers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMake interface exposure explicit
Owen Smith [Thu, 18 Dec 2014 14:28:18 +0000 (14:28 +0000)]
Make interface exposure explicit

Add pass-through query for XenBus's Cache interface and
account for interface versions when determining the revision(s).
Do not pass through any other queries, as the revision is not
accounted for.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoFix line endings
Paul Durrant [Fri, 19 Dec 2014 16:27:56 +0000 (16:27 +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:42:10 +0000 (15:42 +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 12:04:11 +0000 (12:04 +0000)]
Make sure version header gets re-built each time

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoSquash buffer overlow error messages in transmit
Paul Durrant [Fri, 19 Dec 2014 11:59:05 +0000 (11:59 +0000)]
Squash buffer overlow error messages in transmit

Occasionally packets are too fragmented to fit into the maximum number of
requests allowed by the netif protocol. In this case the packet preparation
function will fail with STATUS_BUFFER_OVERFLOW and the alternative copy-
coalesce prepation function will be called. These error messages are
therefore un-interesting (since the number of packets directly granted vs.
those that were copied is available in the statistics dump initiated by the
debug VIRQ).
This patch squashes the error messages to avoid filling logs.

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

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAvoid incorrecly extending checksum accumulator
Paul Durrant [Fri, 7 Nov 2014 16:46:24 +0000 (16:46 +0000)]
Avoid incorrecly extending checksum accumulator

It was noticed that checksums were occasionally being incorrectly verified.
The reason for this turned out to be that the value passed to
ChecksumVerify as a USHORT was being extended to ULONG prior to being
inverted, thus leaving bits 16-31 set and thus an overflow from the lower
bits was not being correctly folded.

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoSet correct payload offset when processing checksums
Paul Durrant [Fri, 7 Nov 2014 16:39:37 +0000 (16:39 +0000)]
Set correct payload offset when processing checksums

The receiver code was not accounting for a non-zero packet offset when
processing checksums. This lead to inbound packets being corrupted.

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoFix a stupid if-then-else
Paul Durrant [Fri, 7 Nov 2014 16:37:43 +0000 (16:37 +0000)]
Fix a stupid if-then-else

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 agoCope with unexpected initial backend states
Paul Durrant [Mon, 22 Sep 2014 11:02:44 +0000 (12:02 +0100)]
Cope with unexpected initial backend states

If the OS is booted via iSCSI, then the backend will already be in the
Connected state when the xenvif driver loads.  The backend is stable
in this state, so __FrontendPrepare() eventually times out waiting for
the backend state to change.

Fix by leading the backend through the Closing and Closed states if we
find it initially in the Connected (or Closing) states.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
Forward ported.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate documentation
Paul Durrant [Wed, 17 Sep 2014 14:04:54 +0000 (15:04 +0100)]
Update documentation

Improve build documentation and add doxygen configuration and tags to build
documentation for the VIF interface.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAdd support for Visual Studio 2013 & WDK 8.1
Ben Chalmers [Wed, 27 Aug 2014 14:39:02 +0000 (15:39 +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 agoChange pointer assignment to intended structure assignment
Paul Durrant [Thu, 14 Aug 2014 16:44:49 +0000 (17:44 +0100)]
Change pointer assignment to intended structure assignment

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoAdd missing API versioning text to README.md
Paul Durrant [Thu, 14 Aug 2014 14:18:43 +0000 (15:18 +0100)]
Add missing API versioning text to README.md

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUpdate branding
Paul Durrant [Thu, 14 Aug 2014 10:34:22 +0000 (11:34 +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 [Thu, 14 Aug 2014 10:12:36 +0000 (11:12 +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>
10 years agoMerge pull request #35 from pauldu/xop-577
Paul Durrant [Fri, 8 Aug 2014 09:11:27 +0000 (10:11 +0100)]
Merge pull request #35 from pauldu/xop-577

Treat a missing Aliases value as an empty one

10 years agoTreat a missing Aliases value as an empty one
Paul Durrant [Fri, 8 Aug 2014 09:04:57 +0000 (10:04 +0100)]
Treat a missing Aliases value as an empty one

There are certain cases when xennet's co-installer may not have run so
we end up trying to (safely) start PDOs without even an empty alias.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #34 from pauldu/ca-140184
Ben Chalmers [Thu, 31 Jul 2014 07:43:43 +0000 (08:43 +0100)]
Merge pull request #34 from pauldu/ca-140184

[CA-140184]

Revert previous commits that add use of XENBUS's CACHE interface to XENVIF (and then modify cache lifecycle to avoid a crash during hibernation).
The reversions undid a couple of other fixes which are re-applied by the third patch.

Approved-By: Ben.Chalmers@citrix.com
10 years agoRe-fix issues uncovered by previous reversions.
Paul Durrant [Wed, 30 Jul 2014 17:09:34 +0000 (18:09 +0100)]
Re-fix issues uncovered by previous reversions.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRevert commit 80ace57b353764c9165673e021c2a6cf7616a3bb
Paul Durrant [Wed, 30 Jul 2014 15:29:43 +0000 (16:29 +0100)]
Revert commit 80ace57b353764c9165673e021c2a6cf7616a3bb

>    Use new XENBUS CACHE interface rather than local pool code
>
>    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRevert commit 3714613096b1bb7b7a76e9d360106ea19208f243
Paul Durrant [Wed, 30 Jul 2014 15:25:49 +0000 (16:25 +0100)]
Revert commit 3714613096b1bb7b7a76e9d360106ea19208f243

>    Change Cache lifecycle to match ring lifecycle.
>    Ensure caches are destroyed when device transitions to D3 to prevent
>    assertion failure in xenbus.
>
>    Signed-off-by: Owen Smith <owen.smith@citrix.com>

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #33 from OwenSmith/master
Paul Durrant [Tue, 10 Jun 2014 13:36:24 +0000 (14:36 +0100)]
Merge pull request #33 from OwenSmith/master

Change Cache lifecycle to match ring lifecycle.

10 years agoChange Cache lifecycle to match ring lifecycle.
Owen Smith [Tue, 10 Jun 2014 12:34:25 +0000 (13:34 +0100)]
Change Cache lifecycle to match ring lifecycle.
Ensure caches are destroyed when device transitions to D3 to prevent
assertion failure in xenbus.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
10 years agoMerge pull request #32 from pauldu/gnttab
Owen Smith [Mon, 2 Jun 2014 13:11:04 +0000 (14:11 +0100)]
Merge pull request #32 from pauldu/gnttab

Updated GNTTAB interface

10 years agoUse new GNTTAB interface
Paul Durrant [Fri, 30 May 2014 08:58:11 +0000 (09:58 +0100)]
Use new GNTTAB interface

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoRemove much code duplication
Paul Durrant [Thu, 29 May 2014 15:09:22 +0000 (16:09 +0100)]
Remove much code duplication

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoUse new XENBUS CACHE interface rather than local pool code
Paul Durrant [Thu, 29 May 2014 14:51:48 +0000 (15:51 +0100)]
Use new XENBUS CACHE interface rather than local pool code

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #30 from pauldu/master
Owen Smith [Thu, 29 May 2014 08:35:35 +0000 (09:35 +0100)]
Merge pull request #30 from pauldu/master

Avoid duplicate entries in the IP address table

10 years agoAvoid duplicate entries in the IP address table
Paul Durrant [Wed, 28 May 2014 16:56:06 +0000 (17:56 +0100)]
Avoid duplicate entries in the IP address table

Duplicates are useless and actually cause problems overflowing xenstore's
quota. Also, we should not bother looking at the MIB address table unless
the frontend is CONNECTED or ENABLED since our NetLuid is not necessarily
valid unless we are in one of those states.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
10 years agoMerge pull request #29 from OwenSmith/master
Paul Durrant [Thu, 22 May 2014 13:04:41 +0000 (14:04 +0100)]
Merge pull request #29 from OwenSmith/master

Protect Netio imports with a mutex.

10 years agoProtect Netio imports with a mutex.
Owen Smith [Thu, 22 May 2014 12:57:34 +0000 (13:57 +0100)]
Protect Netio imports with a mutex.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
11 years agoMerge pull request #27 from pauldu/master
Ben Chalmers [Thu, 1 May 2014 08:21:31 +0000 (09:21 +0100)]
Merge pull request #27 from pauldu/master

Re-try AuxKlibQueryModuleInformation() if buffer was too small

Approved-By: Ben Chalmers <ben.chalmers@citrix.com>
11 years agoRe-try AuxKlibQueryModuleInformation() if buffer was too small
Paul Durrant [Thu, 1 May 2014 08:16:56 +0000 (09:16 +0100)]
Re-try AuxKlibQueryModuleInformation() if buffer was too small

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove some debug spew on grant table allocation failures
Paul Durrant [Tue, 29 Apr 2014 14:52:29 +0000 (15:52 +0100)]
Remove some debug spew on grant table allocation failures

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix stupid typo (and add an error warning)
Paul Durrant [Tue, 29 Apr 2014 10:09:34 +0000 (11:09 +0100)]
Fix stupid typo (and add an error warning)

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoCope with GranterPermitAccess() failing
Paul Durrant [Fri, 25 Apr 2014 15:46:44 +0000 (16:46 +0100)]
Cope with GranterPermitAccess() failing

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #26 from pauldu/master
Paul Durrant [Thu, 24 Apr 2014 17:02:36 +0000 (18:02 +0100)]
Merge pull request #26 from pauldu/master

Implement proper reference counting in the NETIO interface, and

11 years agoTrack eject request state in PDO
Paul Durrant [Thu, 24 Apr 2014 16:57:53 +0000 (17:57 +0100)]
Track eject request state in PDO

Tracking the state of the eject request in the frontend was sub-optimal
as:

a) The lifetime of the frontend is not quite the same as the PDO.
b) It was possible for the FDO scan to race with eject and make it
   look like the device had just disappeared.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoImplement proper reference counting in the NETIO interface, and
Paul Durrant [Thu, 24 Apr 2014 15:52:20 +0000 (16:52 +0100)]
Implement proper reference counting in the NETIO interface, and
fix some other problems with VIF eject.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoUse a timer rather than a thread for pool reap
Paul Durrant [Wed, 23 Apr 2014 09:51:51 +0000 (10:51 +0100)]
Use a timer rather than a thread for pool reap

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoImprove the way that assertions are handled for free builds
Paul Durrant [Wed, 23 Apr 2014 09:50:55 +0000 (10:50 +0100)]
Improve the way that assertions are handled for free builds

In line with the changes to XENBUS.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoFix SDV
Paul Durrant [Tue, 22 Apr 2014 08:36:59 +0000 (09:36 +0100)]
Fix SDV

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove erroneous #if 0s
Paul Durrant [Thu, 17 Apr 2014 11:59:22 +0000 (12:59 +0100)]
Remove erroneous #if 0s

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRe-order refine because it vapourizes the SDV summary log
Paul Durrant [Tue, 15 Apr 2014 16:33:22 +0000 (17:33 +0100)]
Re-order refine because it vapourizes the SDV summary log

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #25 from pauldu/netio
Paul Durrant [Tue, 15 Apr 2014 16:04:09 +0000 (17:04 +0100)]
Merge pull request #25 from pauldu/netio

Handle SDV scan and refine

11 years agoHandle SDV scan and refine
Paul Durrant [Tue, 15 Apr 2014 16:01:31 +0000 (17:01 +0100)]
Handle SDV scan and refine

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #24 from pauldu/netio
Paul Durrant [Tue, 15 Apr 2014 16:02:18 +0000 (17:02 +0100)]
Merge pull request #24 from pauldu/netio

Get SDV working

11 years agoAdd SDV to normal driver build
Paul Durrant [Mon, 14 Apr 2014 14:53:00 +0000 (15:53 +0100)]
Add SDV to normal driver build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoRemove IP helper linkage (and hence dependency on netio.sys)
Paul Durrant [Mon, 14 Apr 2014 12:15:04 +0000 (13:15 +0100)]
Remove IP helper linkage (and hence dependency on netio.sys)

The linkage dependency on netio.sys prevents SDV from working. Since we need
the IP helper functionality there's no choice other than to remove the
linkage and replace it with run-time function lookup. Alas this is not as
simple as using MmGetSystemRoutineAddress() as that only works for kernel and
hal functions. We need to actually parse the netio.sys module export table
directly and then create thunks to jump into the code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
11 years agoMerge pull request #20 from pauldu/gnttab2
Owen Smith [Mon, 14 Apr 2014 15:16:18 +0000 (16:16 +0100)]
Merge pull request #20 from pauldu/gnttab2

Granter abstraction and switch to new GNTTAB interface

11 years agoSwitch to new GNTTAB interface.
Paul Durrant [Fri, 11 Apr 2014 14:53:37 +0000 (15:53 +0100)]
Switch to new GNTTAB interface.

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