This commit merges the balloon driver sources in stable branch
into master. A single code-base can now produce both the
standalone "no-service" flavor of the driver as well as the
traditional one which requires the user-mode service running.
The newly introduced USE_BALLOON_SERVICE macro is used to
distinguish between the two flavors.
Signed-off-by: Ladi Prosek <[email protected]>
User-mode service had used file queue on device.
So it was removed and replaced by workitem queued from dpc directly
Now, there is no need to run user-mode service to gather stats,
but if you'll do there will be no errors.
Workitem will push stats to virtio exactly same times as isr was received.
Signed-off-by: Alexey V. Kostyushko <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
We'll use 'officially undocumented' SYSTEM_BASIC_INFORMATION and
SYSTEM_PERFORMANCE_INFORMATION structures of ZwQuerySystemInformation
syscall. Actually they are documented in nonpublic SDK for oem vendors.
To make it clear: this API is dependable though it isn't publically
documented at MSDN, backward compatibility is kept whenever new fields
are added at the end of the structures. Definitions were taken from Garry
Nebbett 'Windows NT/2000 Native API Reference' and were checked/updated
comparing to various internet sources (such as reactos.org).
This patch only traces stats gathered from kernel. It proves that counter
values are identical to those obtained from user-mode service.
(To veryfy: change #if 0 to #if 1 in BalloonIoWrite, for Win8 add
PRINT_DEBUG to .vcxproj)
Signed-off-by: Alexey V. Kostyushko <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>