]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/log
pvdrivers/win/xenbus.git
6 years agoWork around bug in VS2017 SDV
Paul Durrant [Thu, 19 Jul 2018 08:18:43 +0000 (09:18 +0100)]
Work around bug in VS2017 SDV

It appears that the new SDV cannot handle the quoted __MODULE__ definitions
on compailer command lines and will thus crash out with some obscure error.
Increasing the logging level shows output of the form:

slamcl {
.
.
.
cl : Command line warning D9024 : unrecognized source file type 'XENBUS" /D POOL_NX_OPTIN=1 /D NT_PROCESSOR_GROUPS /D _WIN64 /D _AMD64_ /D AMD64 /D _WIN32_WINNT=0x0A00 /D WINVER=0x0A00 /D WINNT=1 /D NTDDI_VERSION=0x0A000005 /GF /Gm- /Zp8 /GS /guard:cf /Gy /fp:precise /Zc:wchar_t- /Zc:forScope /Zc:inline /GR- /Fox64\Windows10Release\ /Fdx64\Windows10Release\vc141.pdb /Gz /wd4464 /wd4711 /wd4548 /wd4770 /wd4820 /wd4668 /wd4255 /wd5045 /wd6001 /wd6054 /wd28160 /wd30030 /wd30029 /wd4603 /wd4627 /wd4986 /wd4987 /wd4996 /FIC:\Program', object file assumed
cl : Command line warning D9027 : source file 'XENBUS" /D POOL_NX_OPTIN=1 /D NT_PROCESSOR_GROUPS /D _WIN64 /D _AMD64_ /D AMD64 /D _WIN32_WINNT=0x0A00 /D WINVER=0x0A00 /D WINNT=1 /D NTDDI_VERSION=0x0A000005 /GF /Gm- /Zp8 /GS /guard:cf /Gy /fp:precise /Zc:wchar_t- /Zc:forScope /Zc:inline /GR- /Fox64\Windows10Release\ /Fdx64\Windows10Release\vc141.pdb /Gz /wd4464 /wd4711 /wd4548 /wd4770 /wd4820 /wd4668 /wd4255 /wd5045 /wd6001 /wd6054 /wd28160 /wd30030 /wd30029 /wd4603 /wd4627 /wd4986 /wd4987 /wd4996 /FIC:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files', object file assumed
cl : Command line warning D9027 : source file 'Files' ignored
cl : Command line warning D9024 : unrecognized source file type '(x86)\Windows', object file assumed
cl : Command line warning D9027 : source file '(x86)\Windows' ignored
cl : Command line warning D9024 : unrecognized source file type 'Kits\10\Include\10.0.17134.0\shared\warning.h /analyze /analyze:quiet /analyze:stacksize1024 /analyze:pluginC:\Program', object file assumed
cl : Command line warning D9027 : source file 'Kits\10\Include\10.0.17134.0\shared\warning.h /analyze /analyze:quiet /analyze:stacksize1024 /analyze:pluginC:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files', object file assumed
cl : Command line warning D9027 : source file 'Files' ignored
.
.

(Notice the mismatched ' and " quotes around XENBUS).

This patch pulls the definition of __MODULE__ into dbg_print.h (as well as
the coinstaller and monitor sources) as follows:

    #define stringify_literal(_text) #_text
    #define stringify(_text) stringify_literal(_text)
    #define __MODULE__ stringify(PROJECT)

PROJECT is then defined on the compiler command line as the simple,
unquoted, value of $(ProjectName) which is a Visual Studio intrinsic.
This seems to keep SDV happy while still providing a reasonable definition
of __MODULE__ for use in debug output.

NOTE: This patch also turns on SDV debugging by default to aid future
      diagnosis of issues.

Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoFix SDV release parameter
Paul Durrant [Wed, 18 Jul 2018 13:17:39 +0000 (14:17 +0100)]
Fix SDV release parameter

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoDisable spectre mitigation warnings
Paul Durrant [Tue, 10 Jul 2018 15:24:38 +0000 (16:24 +0100)]
Disable spectre mitigation warnings

These are not terribly useful and cause the build to fail.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoUse a slab allocator to back XENBUS_CACHE memory
Paul Durrant [Fri, 29 Jun 2018 10:45:01 +0000 (11:45 +0100)]
Use a slab allocator to back XENBUS_CACHE memory

Rather than using non-paged pool and suffering the overhead of a header on
every object, use a slab allocator.

The slab allocator allocates and frees whole pages, and there is only one
control structure per-slab.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoRelax check for new bindings
Owen Smith [Tue, 26 Jun 2018 11:17:32 +0000 (12:17 +0100)]
Relax check for new bindings

Only if the major version part of the revision changes is it unsafe to
update the drivers without removing the unplug keys (thereby forcing a
fallback to emulated devices on the next reboot). Minor version changes
should be backwards compatible (within a reasonable time-frame).

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Edited commit comment.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix event channel ABI fall-back
Paul Durrant [Tue, 10 Apr 2018 16:24:58 +0000 (17:24 +0100)]
Fix event channel ABI fall-back

If the version of Xen that the guest is running on does not support the
FIFO event channel ABI then the code is supposed to fall back to using the
old '2-level' ABI through the shared info page. However, this fall-back
does not work correctly because the error path in EvtchnFifoAcquire()
causes the error status to be overwritten with STATUS_SUCCESS.

This patch makes sure the error status is preserved.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix control/shutdown acknowledgement
Paul Durrant [Tue, 10 Apr 2018 16:21:38 +0000 (17:21 +0100)]
Fix control/shutdown acknowledgement

The code in FdoSuspend() currently acknowledges a suspend request by
removing the control/shutdown node from xenstore. This is not correct.

The documentation [1] states that a request should be acknowledged by
writing the empty string. This patch makes the code behave correctly.

[1] xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/xenstore-paths.markdown;hb=HEAD#l413

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoLog system timers pre- and post-suspend
Paul Durrant [Mon, 19 Mar 2018 17:16:51 +0000 (17:16 +0000)]
Log system timers pre- and post-suspend

It's useful to know what difference, if any, in the main system timers
Windows is subject to across a suspend/resume or migrate.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoStop using BAR space to host Xen data structures
Paul Durrant [Wed, 31 Jan 2018 13:37:10 +0000 (13:37 +0000)]
Stop using BAR space to host Xen data structures

Currently XENBUS makes use of the memory BAR of the PCI device to which it
binds as a source of unpopulated GFNs to host Xen data structures, such as
the shared info and grant table.

There is a problem with doing this, which is that Windows (unsurprisingly)
sets up a non-cached MTRR for the page range covering PCI BARs so accesses
to BAR space (and hence the Xen data structures) should be non-cached.
However, Xen itself contains a work-around to avoid the slow access times
that would ordinarily result from the this; it ignores the MTRRs if no
real devices are passed through to the guest so accesses are actually
cached. Thus, in the normal case, there is no penalty to pay... but as soon
as hardware is passed through to a guest, the work-around no longer applies
and there is a noticeable drop in PV driver performance. (E.g. network
throughput can drop by ~30-40%).

This patch modifies XENBUS to allocate a 2MB area of RAM (which will always
fall into a cached MTRR), use a decrease_reservation hypercall to
de-populate the area, and then use that as a source of GFNs instead of the
BAR. Hence, the work-around in Xen no longer has any baring on accessing of
Xen data structures and thus there is no longer any performance penalty
when hardware is passed through to a guest.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd a XEN_API to get the maximum physical RAM address
Paul Durrant [Wed, 31 Jan 2018 11:52:37 +0000 (11:52 +0000)]
Add a XEN_API to get the maximum physical RAM address

The initialization code in XEN.DLL already scans the physical memory
ranges so it's trivial to store the maximum physical address seen and then
provide a function to return that value.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd Order parameter to MemoryDecreaseReservation()...
Paul Durrant [Wed, 31 Jan 2018 11:40:27 +0000 (11:40 +0000)]
Add Order parameter to MemoryDecreaseReservation()...

...and MemoryPopulatePhysmap()

Stop hard-coding the page order to 0 and allow the caller to specify it.
Also add a couple of #defines for 4k and 2M page orders.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoDo more optimization in release builds and add /Qspectre flag
Paul Durrant [Mon, 29 Jan 2018 15:05:10 +0000 (15:05 +0000)]
Do more optimization in release builds and add /Qspectre flag

Spectre mitigations apparently only work on optimized code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd support for building with Visual Studio 2017
Paul Durrant [Mon, 29 Jan 2018 10:30:47 +0000 (10:30 +0000)]
Add support for building with Visual Studio 2017

Also remove mappings for obsolete versions of VS in build.py.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoMake sure Mdl->StartVa is set by __AllocatePages()
Paul Durrant [Thu, 25 Jan 2018 12:40:34 +0000 (12:40 +0000)]
Make sure Mdl->StartVa is set by __AllocatePages()

wdm.h carries this comment:

// Notice that while in the context of the subject thread, the base virtual
// address of a buffer mapped by an MDL may be referenced using the
// following:
//
//      Mdl->StartVa | Mdl->ByteOffset
//

Hence it is important that a mapped MDL has a valid StartVa field as well
as a valid MappedSystemVa field. Unfortunately, for reasons best known to
Microsoft, MmMapLockedPagesSpecifyCache() does not ensure this is the
case, so it needs to be fixed up by __AllocatePages() itself.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd support for vkbd PV backends
Paul Durrant [Wed, 20 Dec 2017 11:57:38 +0000 (11:57 +0000)]
Add support for vkbd PV backends

Recent patches to QEMU allow the XENVKBD and XENHID drivers to function
correctly. This patch therefore enables enumeration of the VKBD PDOs that
allow those drivers to bind.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoUse new query method in XENBUS_GNTTAB method to get STORE and CONSOLE PFNs
Paul Durrant [Thu, 30 Nov 2017 10:25:01 +0000 (10:25 +0000)]
Use new query method in XENBUS_GNTTAB method to get STORE and CONSOLE PFNs

Since XENBUS_GNTTAB now has a query method, the PFNs of the STORE and
CONSOLE shared pages can be found without the need to make hypercalls (to
get them via HVMOP_get_param).

This patch makes use of the new mechanism but this also requires a
re-ordering of some of the interface initialization code in FdoCreate().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoDon't assume EventPageMdl has been allocated...
Paul Durrant [Thu, 30 Nov 2017 10:11:42 +0000 (10:11 +0000)]
Don't assume EventPageMdl has been allocated...

...when calling EvtchnFifoContract()

The allocation is deferred until at least one event channel is allocated,
but EvtchnFifoContract() is called from EvtchnFifoRelease()n which can be
called before that happens.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove FIST code from XENBUS_CACHE implementation
Paul Durrant [Thu, 30 Nov 2017 10:10:13 +0000 (10:10 +0000)]
Remove FIST code from XENBUS_CACHE implementation

They are not used by anything and having XENBUS_CACHE depend on
XENBUS_STORE makes things awkward if we ever want to make use of caches
in XENBUS_STORE itself or any other the other interfaces it depends upon.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd a new method to XENBUS_GNNTAB to a query a reference
Paul Durrant [Thu, 30 Nov 2017 10:08:17 +0000 (10:08 +0000)]
Add a new method to XENBUS_GNNTAB to a query a reference

This will be used a subsequent patch to extract the STORE and CONSOLE
PFNs from the grant table reserved entries, which form part of the Xen
ABI.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoPartially revert "Simplify EVTCHN Unmask"
Paul Durrant [Fri, 20 Oct 2017 15:00:11 +0000 (16:00 +0100)]
Partially revert "Simplify EVTCHN Unmask"

This partially reverts commit 3ad02ccc6c68, which removed the possibility
that unmasking an event channel could fail. This semantic was actually
useful in some cases though, specifically to avoid dropping out of a DPC
only to have it immediately re-queued.

This patch, therefore, re-instates the older semantic but makes it optional
so that callers that cannot easily tolerate such a failure can force the
unmask to succeed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove unused static functions
Paul Durrant [Fri, 20 Oct 2017 16:16:19 +0000 (17:16 +0100)]
Remove unused static functions

These should have been removed when the old versions of the XENBUS_EVTCHN
interface were retired.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix EvtchnSend functions to match prototypes
Paul Durrant [Fri, 20 Oct 2017 14:56:15 +0000 (15:56 +0100)]
Fix EvtchnSend functions to match prototypes

The method prototypes in the XENBUS_EVTCHN interface void, so the
implementations should be void functions.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoVeto zero length range pop, get and put
Paul Durrant [Fri, 13 Oct 2017 15:17:32 +0000 (16:17 +0100)]
Veto zero length range pop, get and put

It clearly makes no sense to allocate a zero length range, but
both RangeSetPop() and RangeSetGet() currently allow it. RangeSetPut()
also allows such a range to be freed but trips over an assertion in
a checked build and will hopelessly confuse the code in a free build
probably leading to a subsequent crash.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoGet rid of old XenServer-ism
Paul Durrant [Tue, 22 Aug 2017 11:04:36 +0000 (12:04 +0100)]
Get rid of old XenServer-ism

Old versions of XenServer used to require that Windows tell the hypervisor
whether it was 64-bit or 32-bit so that the shared info page could be layed
out correctly.

This requirement was dropped in later versions of XenServer but some
versions had a bug where the domain wallclock time was not updated
correctly unless the old mechanism was used.

All such versions of XenServer have long been out of support and such hacks
really have no place in the Xen Project code-base anyway.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove now-unused HVMOP
Paul Durrant [Tue, 22 Aug 2017 09:33:01 +0000 (10:33 +0100)]
Remove now-unused HVMOP

The previous patch removed the only call-site for HvmGetTime(). This patch
removes the function now that it is no longer used.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoWallclock Time Calculation Checks Update Versions For Consistency
Eric Mackay [Mon, 21 Aug 2017 14:58:15 +0000 (15:58 +0100)]
Wallclock Time Calculation Checks Update Versions For Consistency

Checking the shared_info update versions is necessary to get a
consistent set of values. The version is incremented once when the
update starts, and then incremented again after the update has
completed. To verify that a set of values obtained from shared_info
is consistent, the version must not only look at equality of
versions, but the version must also be even. Data can only be safely
be captured within the version check loop.

There is no need to use a hypercall to get the system time, since
this is alredy captured in the shared_info struct. A cached version
of the time since boot is stored in structures for each vcpu, but
this has to be combined with the timestamp counter and some scaling
factors to get the actual current time since boot.

Clock synchronization can also occur, and the dom0 will ensure that
the values in the shared_info and vcpu_time_info structs are kept
current to reflect this.

Signed-off-by: Eric Mackay <mackayem@amazon.com>
Don't introduce new macro for the sake of testing LSB.
Use compiler intrinsic for reading TSC.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRevert "Make sure registry updates and deletes are flushed"
Paul Durrant [Thu, 3 Aug 2017 09:43:50 +0000 (10:43 +0100)]
Revert "Make sure registry updates and deletes are flushed"

It transpires that, on certain versions of Windows, calling ZwFlushKey()
early in boot not only fails (which is not surprising) but also logs
an error event.

This patch reverts commit 690f5474a9c6257fb15bc07b96c56cb64f193f65 to
avoid such noise in the event logs. There is clearly no option but
to trust Windows lazy flush to DTRT.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix ASSERTion failure
Paul Durrant [Wed, 2 Aug 2017 14:06:42 +0000 (15:06 +0100)]
Fix ASSERTion failure

Commit 6aef63e0 "Add optional log level settings" introduced an ASSERTion
failure during unload of XENBUS, because the ConsoleLogLevel field of the
driver structure was not being zeroed.

This patch fixes the problem.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd optional log level settings
Owen Smith [Tue, 25 Jul 2017 09:50:36 +0000 (10:50 +0100)]
Add optional log level settings

Adds XenLogLevel and QemuLogLevel to xen.sys and ConsoleLogLevel
to xenbus.sys, which can be used to override the default log levels.
Each value is a REG_MULTI_SZ that contains an enumerated list of
log levels; TRACE, INFO, WARNING, ERROR, CRITICAL are defined.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Minor style tweaks.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoUpdate XENBUS_EVTCHN Wait method to avoid races
Paul Durrant [Fri, 26 May 2017 19:57:51 +0000 (15:57 -0400)]
Update XENBUS_EVTCHN Wait method to avoid races

Use of the XENBUS_EVTCHN method is prone to races in that a client
usually wants to check that something that should be triggered by an
event and, if it has not occurred, wait for the next event.
The problem is that the client may makes its check, the event then occurs,
and then the client waits. Thus the event is missed and the client only
wakes up when the timeout expires.

This patch changes the Wait method to take an explicit event count to wait
for, and adds a method to sample the current event count. A client can
then avoid a race as described above by sampling the event count first,
making its check and then waiting for the event count to increment by one.
If the event occurred between the check and the wait, the wait will now
return immediately.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove interface versions no longer exposed through PDO revisions
Paul Durrant [Fri, 26 May 2017 19:04:10 +0000 (15:04 -0400)]
Remove interface versions no longer exposed through PDO revisions

XENBUS_EVTCHN_INTERFACE versions prior to 4 and
XENBUS_SHARED_INFO_INTERFACE version 1 are no longer available for
external query and nothing internal to the XENBUS package uses them, so
the code can be removed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove VS2012 and VS2013 build scripts
Paul Durrant [Thu, 18 May 2017 11:55:18 +0000 (12:55 +0100)]
Remove VS2012 and VS2013 build scripts

This patch removes the scripts for building under VS2013 and VS2013 and
also fixes the package destination when building using VS2015.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoReboot request keys should be volatile
Paul Durrant [Mon, 8 May 2017 15:58:43 +0000 (16:58 +0100)]
Reboot request keys should be volatile

When a driver makes a reboot request it should use a volatile registry key.
The monitor service will explicitly remove the key prior to reboot but,
if the reboot is initiated in some other way and the key is non-volatile,
the monitor service will then needlessly prompt for a second reboot.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUpdate the XENBUS_CONSOLE interface
Paul Durrant [Wed, 26 Apr 2017 13:25:10 +0000 (14:25 +0100)]
Update the XENBUS_CONSOLE interface

With this patch the interface has enough functionality to support my
prototype XENCONS driver.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd a synthetic PDO for a new XENCONS driver
Paul Durrant [Wed, 26 Apr 2017 10:49:41 +0000 (11:49 +0100)]
Add a synthetic PDO for a new XENCONS driver

I am working on a new XENCONS driver which will surface the PV console to
user-space as a character device. It needs a node to bind to and this
patch provides one.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoMake XENBUS_CONSOLE interface available to other drivers
Paul Durrant [Wed, 26 Apr 2017 10:47:53 +0000 (11:47 +0100)]
Make XENBUS_CONSOLE interface available to other drivers

This patch adds the interface to the set of that may be queried via the
PDO.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRemove unused data structure
Paul Durrant [Wed, 26 Apr 2017 12:18:55 +0000 (13:18 +0100)]
Remove unused data structure

XENBUS_CONSOLE_BUFFER is no longer required, so remove the struct
declaration and typedef.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoMake the XENBUS_CONSOLE Write method properly synchronous
Paul Durrant [Wed, 8 Mar 2017 13:13:18 +0000 (13:13 +0000)]
Make the XENBUS_CONSOLE Write method properly synchronous

Have the method directly write into the console ring (and potentially
block). This removes a lot of complexity from the code and makes the
method safe to be called at IRQL > DISPATCH_LEVEL.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUpdate XENBUS_EVTCHN interface with new Send method
Paul Durrant [Wed, 8 Mar 2017 13:10:10 +0000 (13:10 +0000)]
Update XENBUS_EVTCHN interface with new Send method

The new version of the method has the same arguments and return of the
previous version but does not modify IRQL. It must therefore be called
with IRQL >= DISPATCH_LEVEL. Most callers already do this (usually
because they have a spin lock held) so the overhead of calling
KeRaiseIrql() and KeLowerIrql() can be saved. Also, it makes the method
safe to be called at > DISPATCH_LEVEL.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoSanity check number of parameters in an exception record
Paul Durrant [Wed, 1 Mar 2017 14:00:37 +0000 (14:00 +0000)]
Sanity check number of parameters in an exception record

When the BugCheck intercept dumps an exception record, make sure that
the number of parameters dumped is no more than the maximum possible
in the record.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
Cc: Igor Druzhinin <igor.druzhinin@citrix.com>
8 years agoAdd basic support for PV console
Paul Durrant [Thu, 2 Feb 2017 16:04:02 +0000 (16:04 +0000)]
Add basic support for PV console

Xen toolstacks have, for some time, created a PV console even for HVM
guests but, so far, Windows has had no frontend for this.

This patch adds the basic plumbing for the PV console, under a new
interface called XENBUS_CONSOLE. This interface is currently private to
XENBUS (so not accessible by child drivers) and will initially only support
writing.
The patch adds a new log disposition that will write INFO, WARNING and
ERROR level messages, so these can now be seen by attaching to the console
backend in the toolstack domain.

Future patches will add read support and a new character device to make
the console available to user-space.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUpdate xen headers to RELEASE-4.8.0
Paul Durrant [Mon, 30 Jan 2017 11:53:39 +0000 (11:53 +0000)]
Update xen headers to RELEASE-4.8.0

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoCorrect a small DPC accounting oversight in STORE
Paul Durrant [Thu, 2 Feb 2017 10:03:10 +0000 (10:03 +0000)]
Correct a small DPC accounting oversight in STORE

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFix memory leak in __FreePage()
Paul Durrant [Fri, 6 Jan 2017 13:48:33 +0000 (13:48 +0000)]
Fix memory leak in __FreePage()

The pool memory for the MDL also needs to be freed.

Also, generalise __AllocatePage() and __FreePage() to __AllocatePages()
and __FreePages() to allow for multi-page allocations in future.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUpdate BUILD.md with VS2015/WDK10 information
Paul Durrant [Wed, 14 Dec 2016 16:28:47 +0000 (16:28 +0000)]
Update BUILD.md with VS2015/WDK10 information

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFixes for VS2015/WDK10 build
Paul Durrant [Wed, 14 Dec 2016 15:36:36 +0000 (15:36 +0000)]
Fixes for VS2015/WDK10 build

The package build was not working correctly and caused the overall build
to fail.
At least part of the reason for this is that Microsoft, in their infinite
wisdom, have removed the DIFx redist from WDK10. This patch makes use of
a new environment variable 'DPINST_REDIST' to find the copy of dpinst.exe
to package such that this can be pointed at an older WDK or alternative
location where dpinst.exe can be found.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd support for building under VS2015/WDK10
Paul Durrant [Fri, 9 Dec 2016 14:54:16 +0000 (14:54 +0000)]
Add support for building under VS2015/WDK10

Moving to the new toolchain also threw up a few new warnings, which this
patch either fixes or squashes. Also, SDV appears to be fragile in new
ways (and whinge about some new things) so there are fixes for that too.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUpdate driver version from 8.2.0 to 9.0.0
Paul Durrant [Mon, 12 Dec 2016 15:16:06 +0000 (15:16 +0000)]
Update driver version from 8.2.0 to 9.0.0

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoSmall whitespace fix to last commit 8.2.0 8.2.0-rc1
Paul Durrant [Tue, 22 Nov 2016 11:12:03 +0000 (11:12 +0000)]
Small whitespace fix to last commit

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFixed improper translation of SCHEDOP_Shutdown return code
David Buches [Tue, 22 Nov 2016 11:08:36 +0000 (11:08 +0000)]
Fixed improper translation of SCHEDOP_Shutdown return code

The documentation for the SCHEDOP_Shutdown hyper-call states that when
invoked with the SHUTDOWN_Suspend reason code, the return value indicates
that the guest domain either suspended (and resumed) in a new domain (0),
or that the operation was canceled (1).

The problem - the SchedShutdown() wrapper wasn't properly translating the
return value for SHUTDOWN_Suspend - it returned a success value for both
successful and canceled suspend operations, which resulted in suspend
callbacks erroneously being invoked for canceled operations, producing
undesirable side effects (suspend callbacks are only supposed to be
invoked when resuming on a new domain).

The code now returns an appropriate status value when SHUTDOWN_Suspend
operations are canceled.

Signed-off-by: David Buches <davebuch@amazon.com>
Slightly re-factored for cosmetic reasons.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRevert 2a9df19f "Log module loading"
Paul Durrant [Fri, 11 Nov 2016 15:26:44 +0000 (15:26 +0000)]
Revert 2a9df19f "Log module loading"

This is a debug patch that should not have been pushed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoMake sure we don't specify an interrupt processor group...
Paul Durrant [Fri, 11 Nov 2016 15:23:04 +0000 (15:23 +0000)]
Make sure we don't specify an interrupt processor group...

...on OS prior to Windows 7.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoLog module loading
Paul Durrant [Fri, 11 Nov 2016 14:23:12 +0000 (14:23 +0000)]
Log module loading

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFix build warnings
Paul Durrant [Thu, 3 Nov 2016 10:30:57 +0000 (10:30 +0000)]
Fix build warnings

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRemove S4 BUG_ONs for interface that don't depend on Xen
Paul Durrant [Wed, 2 Nov 2016 11:00:11 +0000 (11:00 +0000)]
Remove S4 BUG_ONs for interface that don't depend on Xen

Some interfaces don't depend on Xen (e.g. CACHE, RANGE_SET) and so it
is safe for them to have outstanding references across an S4 transtion
or suspend/resume (i.e. transitions which result in a new domain). Only
interfaces that actually depend on Xen (e.g. GNTTAB, EVTCHN) cannot
have outstanding reference in these cases, so limit the BUG_ONs to those.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoFix a couple of issues picked up by Windows 10 verifier
Paul Durrant [Wed, 21 Sep 2016 12:49:20 +0000 (13:49 +0100)]
Fix a couple of issues picked up by Windows 10 verifier

- It's possible for MmAllocatePagesForMdlEx() not to satisfy the
  full allocation request, but not fail. Thus AllocatePage() should
  check that the completed allocation actually matches what it
  asks for.

- RegistryCreateKey() has a memory leak.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoLog Value in UnplugSetRequest() as well as ValueName
Paul Durrant [Wed, 21 Sep 2016 12:31:46 +0000 (13:31 +0100)]
Log Value in UnplugSetRequest() as well as ValueName

A zero value is equivalent to a non-existent registry parameter so
not logging the value can sometimes be misleading.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoStep through hardware revision list in reverse order
Owen Smith [Tue, 20 Sep 2016 17:06:14 +0000 (18:06 +0100)]
Step through hardware revision list in reverse order

Windows treats the HardwareID list as a decending order of specialization
where the first entry is the most specific, and last entry is least
specific. This can lead to install issues when the newer driver has a
less-specific HardwareID, as the older ("more-specific") HardwareID is
used for the match. Reordering the HardwareID list, so that the newest
revision is first, will stop Windows selecting the wrong driver package
to install.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Re-factored slightly for code consistency.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoDon't assume a 32-page grant table
Paul Durrant [Mon, 22 Aug 2016 12:59:10 +0000 (13:59 +0100)]
Don't assume a 32-page grant table

The default grant tabled size in Xen is 32 pages, but it is tunable.
This patch allows the XENBUS_GNTTAB interface to take advantage of an
inreased grant table size.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoThe SOFTWARE registry hive is not accessible at boot time
Paul Durrant [Mon, 22 Aug 2016 07:42:41 +0000 (08:42 +0100)]
The SOFTWARE registry hive is not accessible at boot time

Hence it cannot be used for the monitor request key, otherwise XENVBD
cannot necessarily access it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd missing patch
Paul Durrant [Mon, 22 Aug 2016 07:40:58 +0000 (08:40 +0100)]
Add missing patch

I missed a 'git add' for the latest code in registry.c resulting in the
code here being slightly behind that in XENVIF and XENVBD. This patch
brings it into line.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoBring RegistryCreateKey()'s semantics in line with Win32 RegCreateKeyEx()
Paul Durrant [Fri, 19 Aug 2016 10:29:41 +0000 (11:29 +0100)]
Bring RegistryCreateKey()'s semantics in line with Win32 RegCreateKeyEx()

RegCreateKeyEx() will create intermediate keys in a path whereas
ZwCreateKey() will not. Thus, to align the semantics, this patch will
parse the path passwed to RegistryCreateKey() and create subkeys one by
one.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agomonitor: Create RequestKey in code rather then in the INF
Paul Durrant [Wed, 17 Aug 2016 11:38:37 +0000 (12:38 +0100)]
monitor: Create RequestKey in code rather then in the INF

Also do the name in the XENBUS DriverRequestReboot() function so that it
is not at the mercy of service start ordering.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agomonitor: get dialog paramaters from the registry
Paul Durrant [Fri, 12 Aug 2016 13:39:35 +0000 (14:39 +0100)]
monitor: get dialog paramaters from the registry

It is easier to localise the monitor dialog if it picks up the reboot dialog
title and message from registry parameters rather than having the hardcoded
or in a string table. This patch does this and sets default values in the
the INF file.

This patchs also adds a call to wait for driver installations to complete
before initialiating a reboot.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoRe-work monitor service registry keys
Paul Durrant [Mon, 8 Aug 2016 15:18:59 +0000 (16:18 +0100)]
Re-work monitor service registry keys

Instead of using the monitor service key directly to place reboot
requests, use a key under HKLM\SOFTWARE. This is a better place to handle
interactions between separate PV driver packages.

Also, give the monitor service a description and add a parameter to control
the reboot prompt dialog timeout.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd missing comma to INF
Owen Smith [Thu, 4 Aug 2016 11:13:05 +0000 (12:13 +0100)]
Add missing comma to INF

HLK-1607 picked up the error (Code 1267, Line 96) during the
"DF - InfVerif INF Verification" test. This patch fixes that
failure.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
8 years agoRe-register DbgPrint callback on resume from S4
Paul Durrant [Mon, 1 Aug 2016 14:09:51 +0000 (15:09 +0100)]
Re-register DbgPrint callback on resume from S4

Windows seems to lose knowledge of the callback when it cycles into and
out of S4 so we need to re-register.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoMake DMA interception less chatty in free builds
Paul Durrant [Fri, 29 Jul 2016 13:53:15 +0000 (14:53 +0100)]
Make DMA interception less chatty in free builds

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoXENBUS_MONITOR: don't delete the registry value until a reboot is pending
Paul Durrant [Thu, 28 Jul 2016 09:34:13 +0000 (10:34 +0100)]
XENBUS_MONITOR: don't delete the registry value until a reboot is pending

If a reboot is requested whilst there is no active session then the
monitor will not be able to prompt for reboot. We need to leave the
registry value in place until we have prompted.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoXENBUS_MONITOR refinements
Paul Durrant [Wed, 27 Jul 2016 09:53:02 +0000 (10:53 +0100)]
XENBUS_MONITOR refinements

Use a string table for the dialog message rather than coding it inline.
Also, trim the DisplayName pulled from the registry because Windows 10
seems to prefix it with useless tags.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoUse new service to request reboot rather than SetupAPI
Paul Durrant [Wed, 20 Jul 2016 15:15:40 +0000 (16:15 +0100)]
Use new service to request reboot rather than SetupAPI

This means more code can be removed from the co-installer and we get a
more meaningful message displayed to the user.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoCheck 'Reboot' value in the 'Request' key
Paul Durrant [Wed, 20 Jul 2016 13:40:23 +0000 (14:40 +0100)]
Check 'Reboot' value in the 'Request' key

If the 'Reboot' value is set with a service name then pop up a message in
the active session indicating that the specified service requires a system
reboot in order to complete installation. If the session user responds
affirmatively to the message then initiate a reboot.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd code to monitor 'Request' key
Paul Durrant [Wed, 13 Jul 2016 09:41:18 +0000 (10:41 +0100)]
Add code to monitor 'Request' key

The xenbus_monitor service key has a sub-key called 'Request'. This
patch adss code to register for a notification event on the key.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoAdd a new monitor service
Paul Durrant [Fri, 8 Jul 2016 16:29:37 +0000 (17:29 +0100)]
Add a new monitor service

This patch adds the boilerplate for a service called XENBUS_MONITOR.
The service does not yet have any functionality. This will be added
by subsequent patches.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoReduce priority of suspend thread
Paul Durrant [Tue, 19 Jul 2016 13:13:51 +0000 (14:13 +0100)]
Reduce priority of suspend thread

In cycles of repeated suspend/resume attempt to make sure other threads
get to run by:

a) Dropping the priority of the suspend thread as low as possible.
b) Deliberately waiting for DPSc on other CPUs to complete before
   checking xenstore again.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoClear Unplug keys when PDO names change
Paul Durrant [Wed, 6 Jul 2016 12:58:49 +0000 (13:58 +0100)]
Clear Unplug keys when PDO names change

When upgrading XENBUS the names of PDOs may change because a new
interface version is added.
The co-installer will check for compatibility with child drivers, but
even a compatible child driver will need to re-bind if the name of the PDO
to which is binds has changed. This is a problem for boot-start drivers
because the CDDB was removed in Windows 7, which means the setupapi must
do the re-bind and that means a 0x7B BSOD will ensue if XENVBD's binding
needs to change.
To avoid this problem, if the co-installer detects that PDO names will
change, the Unplug keys are cleared causing a fall-back to emulated devices
on reboot thus allowing the setupapi to run and fix the bindings of other
PV drivers.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
8 years agoDon't free memory at HIGH IRQL
Paul Durrant [Thu, 12 May 2016 09:14:19 +0000 (10:14 +0100)]
Don't free memory at HIGH IRQL

The hash table remove function is invoked by the EVTCHN early callback on
resume from suspend. This means it is invoked at HIGH level with interrupts
disabled, which means that memory can neither be allocated nor freed. The
code, however, does indeed free a data structure and this may well lead
to memory corruption. This patch addresses the issue by deferring freeing
the memory to a subsequently scheduled DPC.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoDon't veto everything on InitSafeModeMode
Paul Durrant [Tue, 1 Mar 2016 14:04:00 +0000 (14:04 +0000)]
Don't veto everything on InitSafeModeMode

In safe mode we want to fall back to using emulated devices (which have
in-box drivers) just in case there is a problem using PV devices. However,
the current scheme of bailing very early in DriverEntry() hence not
supplying an AddDevice() entry point, hence not creating any FDOs and hence
no PDOs is problematic. This is because, when no child FDOs are created,
un-installing a child driver does not invoke the child driver co-installer
and thus cleanup, such as removing unplug registry keys, does not occur.
This then leads to a potential 0x7B BSOD on reboot if XENVBD was removed in
safe mode.

This patch gets rid of the global veto and instead simply vetoes unplug of
emulated devices. This should be sufficient for other PV drivers to
deactivate and let Windows use the emulated devices, but won't get in the
way of normal driver un-install behaviour.

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:06:59 +0000 (16:06 +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 agoReturn more error codes from Inflate/Deflate
Owen Smith [Tue, 15 Dec 2015 11:30:20 +0000 (11:30 +0000)]
Return more error codes from Inflate/Deflate

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Cosmetic fixes.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMove balloon failure conditions to Inflate/Deflate calls
Owen Smith [Tue, 15 Dec 2015 11:30:19 +0000 (11:30 +0000)]
Move balloon failure conditions to Inflate/Deflate calls

Signed-off-by: Owen Smith <owen.smith@citrix.com>
9 years agoBSOD if initial balloon thread has not completed within 20 minutes
Owen Smith [Tue, 15 Dec 2015 11:30:18 +0000 (11:30 +0000)]
BSOD if initial balloon thread has not completed within 20 minutes

Since there is no way of reporting balloon failures to the toolstack,
the only way of stopping a VM from attempting to balloon indefinitely
is to BSOD after a large timeout.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Largely cosmetic changes (comments and #defines).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoIntroduce __FreePoolWithTag()
Paul Durrant [Thu, 10 Dec 2015 11:03:50 +0000 (11:03 +0000)]
Introduce __FreePoolWithTag()

Being able to interpose on memory allocation can be useful during
debugging. We already have __AllocatePoolWithTag() so this patch matches
it with __FreePoolWithTag().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoDon't use C runtime versions of toupper() and tolower()
Paul Durrant [Thu, 10 Dec 2015 10:37:07 +0000 (10:37 +0000)]
Don't use C runtime versions of toupper() and tolower()

It seems that, despite their trivial functionality, the runtime
implementation insists on converting to Unicode! This means those functions
are actually only safe at PASSIVE_LEVEL.
This patch implements __toupper() and __tolower() as replacements with
no such hidden nastiness and modifies callers to use those.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUse new SystemProcessorCount() function for XENBUS_EVTCHN initialization
Paul Durrant [Wed, 9 Dec 2015 14:35:42 +0000 (14:35 +0000)]
Use new SystemProcessorCount() function for XENBUS_EVTCHN initialization

Since it's necessary in a few places in the EVTCHN code to map processor
number to vcpu_id, the available processors should be limited to that for
which such a mapping exists.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoSize XENBUS_CACHE Magazine array to maximum processor count
Paul Durrant [Wed, 9 Dec 2015 14:15:35 +0000 (14:15 +0000)]
Size XENBUS_CACHE Magazine array to maximum processor count

Sizing to active processor count means that the array will be too small if
a processor is onlined after cache creation.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix assertion failure in WLK Hot Add Device Test
Paul Durrant [Wed, 9 Dec 2015 13:29:12 +0000 (13:29 +0000)]
Fix assertion failure in WLK Hot Add Device Test

SystemProcessorChangeCallback needs to whitelist another processor state
change.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoSkip interface checks on non-active FDO
Paul Durrant [Fri, 4 Dec 2015 16:01:03 +0000 (16:01 +0000)]
Skip interface checks on non-active FDO

If the non-active FDO powers down before the active one then we end up
with the BUG_ONs firing erroneously.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix snafu on setting active device when no vendor device is set
Paul Durrant [Thu, 3 Dec 2015 12:33:38 +0000 (12:33 +0000)]
Fix snafu on setting active device when no vendor device is set

If XENBUS is built with no vendor device then the check for vendor device
presences was using NULL. This patch skips the check in that case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoVerify that all interfaces have been released when going into S4
Paul Durrant [Thu, 3 Dec 2015 12:31:57 +0000 (12:31 +0000)]
Verify that all interfaces have been 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 adds BUG_ONs to ensure this is the case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoMake sure registry updates and deletes are flushed
Paul Durrant [Thu, 26 Nov 2015 16:17:14 +0000 (16:17 +0000)]
Make sure registry updates and deletes are flushed

In most cases it is desirable to makre sure any updates are committed to
the registry hive on storage before any further operations are performed.
This patch adds ZwFlushKey() calls to ensure that is the case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoRemove defunct XENFILT_PVDEVICE interface
Paul Durrant [Thu, 26 Nov 2015 13:10:02 +0000 (13:10 +0000)]
Remove defunct XENFILT_PVDEVICE interface

Nothing should now need this interface so the code can be removed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoUse the registry to check for vendor device
Paul Durrant [Thu, 26 Nov 2015 12:43:50 +0000 (12:43 +0000)]
Use the registry to check for vendor device

Using the XENFILT_PVDEVICE interface to select active device (which entails
checking for the presence of a vendor device) means that XENBUS requires a
reboot on installation before any instance can create PDOs. By using the
registry to check for vendor device presence (by looking if there is a key
under HKLM/System/CurrentControlset/Enum) there is no longer any need for
that reboot.

This patch amends the code as necessary, essentially pulling most of the
implementation of XENFILT_PVDEVICE into src/xenbus/driver.c.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoFix SDV build
Paul Durrant [Wed, 25 Nov 2015 13:52:55 +0000 (13:52 +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 11:52:50 +0000 (11:52 +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 XENBUS driver package.

Suggested-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd STORE watchdog
Paul Durrant [Tue, 3 Nov 2015 11:48:30 +0000 (11:48 +0000)]
Add STORE watchdog

There have been occasions during testing when xenstored has apparently
missed sending notification to the frontend that data is on the ring.
This patch adds a watchdog to the code to notice when either of the rings
has stalled and try to move things along.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoDump information about viridian enlightenments
Paul Durrant [Fri, 23 Oct 2015 10:39:06 +0000 (11:39 +0100)]
Dump information about viridian enlightenments

Sometimes, for diagnosis, it's useful to have a log of what viridian
enlightenments are visiable to a VM. This patch adds new code into the
XEN system module to dump relevant information at boot time.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
9 years agoAdd a registry override to veto driver installations
Paul Durrant [Fri, 9 Oct 2015 16:07:48 +0000 (17:07 +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:48:46 +0000 (14:48 +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 missing parameterization of vendor device
Paul Durrant [Thu, 22 Oct 2015 11:24:41 +0000 (12:24 +0100)]
Add missing parameterization of vendor device

The vendor device check in XENFILT was incorrectly hard-coded to C000 rather
than the prevailing vendor device id set at build time.

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