31 Oct, 2014
5 commits
-
commit 45d727cee9e200f5b351528b9fb063b69cf702c8 upstream.
Fix a bug in vmbus_open() and properly propagate the error. I would
like to thank Dexuan Cui for identifying the
issue.Signed-off-by: K. Y. Srinivasan
Tested-by: Sitsofe Wheeler
Signed-off-by: Greg Kroah-Hartman -
commit 72c6b71c245dac8f371167d97ef471b367d0b66b upstream.
Eliminate the call to BUG_ON() by waiting for the host to respond. We are
trying to reclaim the ownership of memory that was given to the host and so
we will have to wait until the host responds.Signed-off-by: K. Y. Srinivasan
Tested-by: Sitsofe Wheeler
Signed-off-by: Greg Kroah-Hartman -
commit 98d731bb064a9d1817a6ca9bf8b97051334a7cfe upstream.
Eliminate calls to BUG_ON() in vmbus_close_internal().
We have chosen to potentially leak memory, than crash the guest
in case of failures.In this version of the patch I have addressed comments from
Dan Carpenter (dan.carpenter@oracle.com).Signed-off-by: K. Y. Srinivasan
Tested-by: Sitsofe Wheeler
Signed-off-by: Greg Kroah-Hartman -
commit 66be653083057358724d56d817e870e53fb81ca7 upstream.
Eliminate calls to BUG_ON() by properly handling errors. In cases where
rollback is possible, we will return the appropriate error to have the
calling code decide how to rollback state. In the case where we are
transferring ownership of the guest physical pages to the host,
we will wait for the host to respond.Signed-off-by: K. Y. Srinivasan
Tested-by: Sitsofe Wheeler
Signed-off-by: Greg Kroah-Hartman -
commit fdeebcc62279119dbeafbc1a2e39e773839025fd upstream.
Posting messages to the host can fail because of transient resource
related failures. Correctly deal with these failures and increase the
number of attempts to post the message before giving up.In this version of the patch, I have normalized the error code to
Linux error code.Signed-off-by: K. Y. Srinivasan
Tested-by: Sitsofe Wheeler
Signed-off-by: Greg Kroah-Hartman
28 Jul, 2014
1 commit
-
commit 9bd2d0dfe4714dd5d7c09a93a5c9ea9e14ceb3fc upstream.
Add code to poll the channel since we process only one message
at a time and the host may not interrupt us. Also increase the
receive buffer size since some KVP messages are close to 8K bytes in size.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
18 Jul, 2014
1 commit
-
commit affb1aff300ddee54df307812b38f166e8a865ef upstream.
Starting with Win8, we have implemented several optimizations to improve the
scalability and performance of the VMBUS transport between the Host and the
Guest. Some of the non-performance critical services cannot leverage these
optimization since they only read and process one message at a time.
Make adjustments to the callback dispatch code to account for the way
non-performance critical drivers handle reading of the channel.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
27 Jun, 2014
2 commits
-
commit a100d88df1e924e5c9678fabf054d1bae7ab74fb upstream.
We try to free two pages when only one has been allocated.
Cleanup path is unlikely, so I haven't found any trace that would fit,
but I hope that free_pages_prepare() does catch it.Signed-off-by: Radim Krčmář
Reviewed-by: Amos Kong
Acked-by: Jason Wang
Signed-off-by: Greg Kroah-Hartman -
commit ae339336dc950b9b05e7ccd3565dd3e8781c06d9 upstream.
The current code posts periodic memory pressure status from a dedicated thread.
Under some conditions, especially when we are releasing a lot of memory into
the guest, we may not send timely pressure reports back to the host. Fix this
issue by reporting pressure in all contexts that can be active in this driver.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
06 May, 2014
1 commit
-
commit 03367ef5ea811475187a0732aada068919e14d61 upstream.
Only ws2012r2 hosts support the ability to reconnect to the host on VMBUS. This functionality
is needed by kexec in Linux. To use this functionality we need to negotiate version 3.0 of the
VMBUS protocol.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2014
2 commits
-
When the guest attempts to connect with the host when there may already be a
connection with the host (as would be the case during the kdump/kexec path),
it is difficult to guarantee timely response from the host. Starting with
WS2012 R2, the host supports this ability to re-connect with the host
(explicitly to support kexec). Prior to responding to the guest, the host
needs to ensure that device states based on the previous connection to
the host have been properly torn down. This may introduce unbounded delays.
To deal with this issue, don't do a timed wait during the initial connect
with the host.Signed-off-by: K. Y. Srinivasan
Cc:
Signed-off-by: Greg Kroah-Hartman -
During the initial VMBUS connect phase, starting with WS2012 R2, we should
specify the VPCU in the guest that should receive the notification. Fix this
issue. This fix is required to properly connect to the host in the kexeced
kernel.Signed-off-by: K. Y. Srinivasan
Cc: [3.9+]
Signed-off-by: Greg Kroah-Hartman
28 Jan, 2014
1 commit
-
This will allow us to use bigger receive buffer, and prevent allocation failure
due to fragmented memory.Signed-off-by: Haiyang Zhang
Reviewed-by: K. Y. Srinivasan
Signed-off-by: David S. Miller
25 Jan, 2014
1 commit
-
Pull ACPI and power management updates from Rafael Wysocki:
"As far as the number of commits goes, the top spot belongs to ACPI
this time with cpufreq in the second position and a handful of PM
core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
usual, with a couple of new features in the mix.The most visible change is probably that we will create struct
acpi_device objects (visible in sysfs) for all devices represented in
the ACPI tables regardless of their status and there will be a new
sysfs attribute under those objects allowing user space to check that
status via _STA.Consequently, ACPI device eject or generally hot-removal will not
delete those objects, unless the table containing the corresponding
namespace nodes is unloaded, which is extremely rare. Also ACPI
container hotplug will be handled quite a bit differently and cpufreq
will support CPU boost ("turbo") generically and not only in the
acpi-cpufreq driver.Specifics:
- ACPI core changes to make it create a struct acpi_device object for
every device represented in the ACPI tables during all namespace
scans regardless of the current status of that device. In
accordance with this, ACPI hotplug operations will not delete those
objects, unless the underlying ACPI tables go away.- On top of the above, new sysfs attribute for ACPI device objects
allowing user space to check device status by triggering the
execution of _STA for its ACPI object. From Srinivas Pandruvada.- ACPI core hotplug changes reducing code duplication, integrating
the PCI root hotplug with the core and reworking container hotplug.- ACPI core simplifications making it use ACPI_COMPANION() in the
code "glueing" ACPI device objects to "physical" devices.- ACPICA update to upstream version 20131218. This adds support for
the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
debug facilities. From Bob Moore, Lv Zheng and Betty Dall.- Init code change to carry out the early ACPI initialization
earlier. That should allow us to use ACPI during the timekeeping
initialization and possibly to simplify the EFI initialization too.
From Chun-Yi Lee.- Clenups of the inclusions of ACPI headers in many places all over
from Lv Zheng and Rashika Kheria (work in progress).- New helper for ACPI _DSM execution and rework of the code in
drivers that uses _DSM to execute it via the new helper. From
Jiang Liu.- New Win8 OSI blacklist entries from Takashi Iwai.
- Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
Rashika Kheria, Tang Chen, Zhang Rui.- intel_pstate driver updates, including proper Baytrail support,
from Dirk Brandewie and intel_pstate documentation from Ramkumar
Ramachandra.- Generic CPU boost ("turbo") support for cpufreq from Lukasz
Majewski.- powernow-k6 cpufreq driver fixes from Mikulas Patocka.
- cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
Brown.- Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
Kumar.- cpuidle cleanups from Bartlomiej Zolnierkiewicz.
- Support for hibernation APM events from Bin Shi.
- Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
disabled during thaw transitions from Bjørn Mork.- PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
Hansson.- PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
Kurusa, Rashika Kheria.- New tool for profiling system suspend from Todd E Brandt and a
cpupower tool cleanup from One Thousand Gnomes"* tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
Documentation: cpufreq / boost: Update BOOST documentation
cpufreq: exynos: Extend Exynos cpufreq driver to support boost
cpufreq / boost: Kconfig: Support for software-managed BOOST
acpi-cpufreq: Adjust the code to use the common boost attribute
cpufreq: Add boost frequency support in core
intel_pstate: Add trace point to report internal state.
cpufreq: introduce cpufreq_generic_get() routine
ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
cpufreq: stats: create sysfs entries when cpufreq_stats is a module
cpufreq: stats: free table and remove sysfs entry in a single routine
cpufreq: stats: remove hotplug notifiers
cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
cpufreq: speedstep: remove unused speedstep_get_state
platform: introduce OF style 'modalias' support for platform bus
PM / tools: new tool for suspend/resume performance optimization
ACPI: fix module autoloading for ACPI enumerated devices
ACPI: add module autoloading support for ACPI enumerated devices
ACPI: fix create_modalias() return value handling
...
19 Dec, 2013
1 commit
-
This patch marks the function hv_synic_free_cpu() as static in hv.c
because it is not used outside this file.Thus, it also eliminates the following warning in hv.c:
drivers/hv/hv.c:304:6: warning: no previous prototype for ‘hv_synic_free_cpu’ [-Wmissing-prototypes]Signed-off-by: Rashika Kheria
Reviewed-by: Josh Triplett
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
07 Dec, 2013
1 commit
-
Replace direct inclusions of , and
, which are incorrect, with
inclusions and remove some inclusions of those files that aren't
necessary.First of all, , and
should not be included directly from any files that are built for
CONFIG_ACPI unset, because that generally leads to build warnings about
undefined symbols in !CONFIG_ACPI builds. For CONFIG_ACPI set,
includes those files and for CONFIG_ACPI unset it
provides stub ACPI symbols to be used in that case.Second, there are ordering dependencies between those files that always
have to be met. Namely, it is required that be included
prior to so that the acpi_pci_root declarations the
latter depends on are always there. And which provides
basic ACPICA type declarations should always be included prior to any other
ACPI headers in CONFIG_ACPI builds. That also is taken care of including
as appropriate.Signed-off-by: Lv Zheng
Cc: Greg Kroah-Hartman
Cc: Matthew Garrett
Cc: Tony Luck
Cc: "H. Peter Anvin"
Acked-by: Bjorn Helgaas (drivers/pci stuff)
Acked-by: Konrad Rzeszutek Wilk (Xen stuff)
Signed-off-by: Rafael J. Wysocki
20 Oct, 2013
1 commit
-
Rescind of subchannels were not being correctly handled. Fix the bug.
Signed-off-by: K. Y. Srinivasan
Cc: [3.11+]
Signed-off-by: Greg Kroah-Hartman
17 Oct, 2013
1 commit
-
The check for calling free_page() on hv_context.synic_event_page[cpu] is the
same for hv_context.synic_message_page[cpu], like a copy-paste error.Signed-off-by: Felipe Pena
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
30 Sep, 2013
1 commit
-
We need/want the mei fixes in here so we can apply other updates that
are depending on them.Signed-off-by: Greg Kroah-Hartman
27 Sep, 2013
16 commits
-
Don't return success if the buffer has not been initialized.
Signed-off-by: Dan Carpenter
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
commit 666b9adc801ef012612c4e43e0f44b2cdc1979cf terminated vmbus
version negotiation incorrectly. We need to terminate the version
negotiation only if the current negotiation were to timeout.Signed-off-by: K. Y. Srinivasan
Cc: Olaf Hering
Signed-off-by: Greg Kroah-Hartman -
The current code does not correctly negotiate the version numbers for the util
driver when hosted on earlier hosts. The version numbers presented by this
driver were not compatible with the version numbers supported by Windows Server
2008. Fix this problem.I would like to thank Olaf Hering (ohering@suse.com) for identifying the problem.
Reported-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
This moves the ringbuffer bus attributes to the dev_groups structure,
deletes the now unneeded struct hv_device_info, and removes some now
unused functions, and variables as everything is now moved to the
dev_groups structure, dev_attrs is no longer needed.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
It's no longer needed, and the struct hv_ring_buffer_debug_info
structure shouldn't be "global" so move it to the local .h file instead.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
It's only used once, only contains 2 function calls, so just make those
calls directly, deleting the function, and the now unneeded structure
entirely.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "client_monitor_conn_id" and "server_monitor_conn_id" bus
attributes to the dev_groups structure, removing the need for it to be
in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "client_monitor_latency" and "server_monitor_latency" bus
attributes to the dev_groups structure, removing the need for it to be
in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "client_monitor_pending" and "server_monitor_pending" bus
attributes to the dev_groups structure, removing the need for it to be
in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
monitor_pages was a void pointer, containing an unknown number of arrays that
we just "knew" were a child and parent array of a specific size. Instead of
that implicit knowledge, let's make them a real pointer, allowing us to have
type safety, and a semblance of sane addressing schemes.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "device_id" bus attribute to the dev_groups structure,
removing the need for it to be in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "class_id" bus attribute to the dev_groups structure,
removing the need for it to be in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "state" bus attribute to the dev_groups structure.
Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "state" bus attribute to the dev_groups structure,
removing the need for it to be in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This moves the "state" bus attribute to the dev_groups structure,
removing the need for it to be in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
This patch is the first in a series that moves the hv bus code to use the
dev_groups field instead of dev_attrs, as dev_attrs is going away in future
kernel releases.It moves the id sysfs file to the dev_groups structure, and creates the needed
show/store functions, instead of relying on one "universal" function for this.
By doing this, it removes the need for this to be in a temporary structure.Tested-by: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman
26 Sep, 2013
1 commit
-
The variable execute_shutdown is only assigned the values true and
false. Change its type to bool.The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)Signed-off-by: Peter Senna Tschudin
Signed-off-by: Greg Kroah-Hartman
31 Aug, 2013
1 commit
-
The current code would attempt to negotiate a different protocol version if
the current negotiation timed out. This triggers an assert in the host (on debug
builds). Avoid this by negotiating a newer version only if the host properly
rejects the current version being negotiated.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
28 Aug, 2013
1 commit
-
The channel state should be correctly set before registering the device. In the current
code the driver probe would fail for channels that have been rescinded and subsequently
re-offered. Fix the bug.Signed-off-by: K. Y. Srinivasan
Cc: stable # 3.11
Signed-off-by: Greg Kroah-Hartman
02 Aug, 2013
1 commit
-
Remove HV_DRV_VERSION, it has no meaning for upstream drivers.
Initially it was supposed to show the "Linux Integration Services"
version, now it is not in sync anymore with the out-of-tree drivers
available from the MSFT website.The only place where a version string is still required is the KVP
command "IntegrationServicesVersion" which is handled by
tools/hv/hv_kvp_daemon.c. To satisfy such KVP request from the host pass
the current string to the daemon during KVP userland registration.Signed-off-by: Olaf Hering
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2013
1 commit
-
This resolves a merge issue with:
drivers/misc/mei/init.cSigned-off-by: Greg Kroah-Hartman