25 Jun, 2013
2 commits
-
We currently allocate synic structures in hv_sync_init(), but there's no way for
the driver to know about the allocation failure and it may continue to use the
uninitialized pointers. Solve this by introducing helpers for allocating and
freeing and doing the allocation before the on_each_cpu() call in
vmbus_bus_init().Cc: Haiyang Zhang
Signed-off-by: Jason Wang
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
This patches add a read barriers to force the driver to check the interrupt mask
before read_index. Otherwise we may lost a kick to host.Cc: K. Y. Srinivasan
Cc: Haiyang Zhang
Signed-off-by: Jason Wang
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
19 Jun, 2013
1 commit
-
Even if guest were compiled without SMP support, it could not assume that host
wasn't. So switch to use mb() instead of smp_mb() to force memory barriers for
UP guest.Signed-off-by: Jason Wang
Cc: Haiyang Zhang
Cc: stable
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
04 Jun, 2013
1 commit
-
Starting with Win8, the host supports multiple sub-channels for a given
device. As in the past, the initial channel offer specifies the device and
is associated with both the type and the instance GUIDs. For performance
critical devices, the host may support multiple sub-channels. The sub-channels
share the same type and instance GUID as the primary channel. The number of
sub-channels offerrred to the guest depends on the number of virtual CPUs
assigned to the guest. The guest can request the creation of these sub-channels
and once created and opened, the guest can distribute the traffic across all
the channels (the primary and the sub-channels). A request sent on a sub-channel
will have the response delivered on the same sub-channel.At channel (sub-channel) creation we bind the channel interrupt to a CPU and
with this sub-channel support we will be able to spread the interrupt load
of a given device across all available CPUs.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman
22 May, 2013
1 commit
-
Linux' notion of cpuid is different from the Host's notion of CPUID. In the
call to bind the channel interrupts, we should use the host's notion of
CPU Ids. Fix this bug.Signed-off-by: K. Y. Srinivasan
Cc: Stable (V3.9)
Signed-off-by: Greg Kroah-Hartman
30 Apr, 2013
1 commit
-
Pull x86 paravirt update from Ingo Molnar:
"Various paravirtualization related changes - the biggest one makes
guest support optional via CONFIG_HYPERVISOR_GUEST"* 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, wakeup, sleep: Use pvops functions for changing GDT entries
x86, xen, gdt: Remove the pvops variant of store_gdt.
x86-32, gdt: Store/load GDT for ACPI S3 or hibernation/resume path is not needed
x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed.
x86: Make Linux guest support optional
x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu
02 Apr, 2013
1 commit
-
As part of updating the vmbus protocol, the function hv_need_to_signal()
was introduced. This functions helps optimize signalling from guest to
host. The newly added memory barrier is needed to ensure that we correctly
decide when to signal the host.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Reported-by: Olaf Hering
Cc: Stable (V3.8+)
Signed-off-by: Greg Kroah-Hartman
30 Mar, 2013
2 commits
-
If memory hot-add fails with the error -EEXIST, then this is a permanent
failure. Notify the host of this information, so the host will not attempt
hot-add again. If the failure were a transient failure, host will attempt
a hot-add after some delay.In this version of the patch, I have added some additional comments
to clarify how the host treats different failure conditions.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
On Hyper-V it will be very efficient to use 2M allocations in the guest as this
makes the ballooning protocol with the host that much more efficient. Hyper-V
uses page ranges (start pfn : number of pages) to specify memory being moved
around and with 2M pages this encoding can be very efficient. However, when
memory is returned to the guest, the host does not guarantee any granularity.
To deal with this issue, split the page soon after a successful 2M allocation
so that this memory can potentially be freed as 4K pages.If 2M allocations fail, we revert to 4K allocations.
In this version of the patch, based on the feedback from Michal Hocko
, I have added some additional commentary to the patch
description.Cc: Michal Hocko
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2013
1 commit
-
Some Windows hosts permit the guest to specify memory hot-add alignment
requirements (if any). Linux currently requires a 128MB alignment on memory
segments that can be hot-added. Specify this alignment requirement to the
host.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
26 Mar, 2013
1 commit
-
local functions that could be static.
Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman
16 Mar, 2013
8 commits
-
This driver supports host initiated backup of the guest. On Windows guests,
the host can generate application consistent backups using the Windows VSS
framework. On Linux, we ensure that the backup will be file system consistent.
This driver allows the host to initiate a "Freeze" operation on all the mounted
file systems in the guest. Once the mounted file systems in the guest are frozen,
the host snapshots the guest's file systems. Once this is done, the guest's file
systems are "thawed".This driver has a user-level component (daemon) that invokes the appropriate
operation on all the mounted file systems in response to the requests from
the host. The duration for which the guest is frozen is very short - a few seconds.
During this interval, the diff disk is comitted.In this version of the patch I have addressed the feedback from Olaf Herring.
Also, some of the connector related issues have been fixed.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Cc: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
Properly cleanup the channel state on receipt of the "offer rescind" message.
Starting with ws2012, the host requires that the channel "relid" be properly
cleaned up when the offer is rescinded.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Implement the memory hot-add functionality. With this, Linux guests can fully
participate in the Dynamic Memory protocol implemented in the Windows hosts.In this version of the patch, based Olaf Herring's feedback, I have gotten
rid of the module level dependency on MEMORY_HOTPLUG. Instead the code within
the driver that depends on MEMORY_HOTPLUG has the appropriate compilation
switches. This would allow this driver to support pure ballooning in cases
where the kernel does not support memory hotplug.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
The balloon driver is stateful. For instance, it needs to keep track of pages
that have been ballooned out to properly post pressure reports. This state cannot
be re-constructed if the driver were to be unloaded and subsequently loaded.
Furthermore, as we support memory hot-add as part of this driver, this driver becomes
even more stateful and this state cannot be re-created. Make the balloon driver
unloadable to deal with this issue.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Execute the hot-add operation in a separate work context.
This allows us to decouple the pressure reporting activity from the
"hot-add" activity. Testing has shown that this makes the guest more
responsive to hot add requests.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Execute the balloon inflation operation in a separate work context.
This allows us to decouple the pressure reporting activity from the
ballooning activity. Testing has shown that this decoupling makes the
guest more reponsive.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
There is no need to request completion notification; get rid of it.
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Cc: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
05 Mar, 2013
1 commit
-
Put all config options needed to run Linux as a guest behind a
CONFIG_HYPERVISOR_GUEST menu so that they don't get built-in by default
but be selectable by the user. Also, make all units which depend on
x86_hyper, depend on this new symbol so that compilation doesn't fail
when CONFIG_HYPERVISOR_GUEST is disabled but those units assume its
presence.Sort options in the new HYPERVISOR_GUEST menu, adapt config text and
drop redundant select.Signed-off-by: Borislav Petkov
Link: http://lkml.kernel.org/r/1362428421-9244-3-git-send-email-bp@alien8.de
Cc: Dmitry Torokhov
Cc: K. Y. Srinivasan
Cc: Haiyang Zhang
Signed-off-by: H. Peter Anvin
28 Feb, 2013
1 commit
-
Use the infrastructure for delivering VMBUS interrupts using a
special vector. With this patch, we can now properly handle
the VMBUS interrupts that can be delivered on any CPU. Also,
turn on interrupt load balancing as well.This patch requires the infrastructure that was implemented in the patch:
X86: Handle Hyper-V vmbus interrupts as special hypervisor interruptsSigned-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
22 Feb, 2013
1 commit
-
Pull char/misc driver patches from Greg Kroah-Hartman:
"Here's the big char/misc driver patches for 3.9-rc1.Nothing major here, just lots of different driver updates (mei,
hyperv, ipack, extcon, vmci, etc.).All of these have been in the linux-next tree for a while."
* tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (209 commits)
w1: w1_therm: Add force-pullup option for "broken" sensors
w1: ds2482: Added 1-Wire pull-up support to the driver
vme: add missing put_device() after device_register() fails
extcon: max8997: Use workqueue to check cable state after completing boot of platform
extcon: max8997: Set default UART/USB path on probe
extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type
extcon: max8997: Set default of ADC debounce time during initialization
extcon: max8997: Remove duplicate code related to set H/W line path
extcon: max8997: Move defined constant to header file
extcon: max77693: Make max77693_extcon_cable static
extcon: max8997: Remove unreachable code
extcon: max8997: Make max8997_extcon_cable static
extcon: max77693: Remove unnecessary goto statement to improve readability
extcon: max77693: Convert to devm_input_allocate_device()
extcon: gpio: Rename filename of extcon-gpio.c according to kernel naming style
CREDITS: update email and address of Harald Hoyer
extcon: arizona: Use MICDET for final microphone identification
extcon: arizona: Always take the first HPDET reading as the final one
extcon: arizona: Clear _trig_sts bits after jack detection
extcon: arizona: Don't HPDET magic when headphones are enabled
...
13 Feb, 2013
1 commit
-
In order to compile in the special Hyper-V interrupt vector, we need
infrastructure in arch/x86/apic/apic.c. At least for now, simply
require CONFIG_X86_LOCAL_APIC in order to enable CONFIG_HYPERV.Link: http://lkml.kernel.org/r/tip-bc2b0331e077f576369a2b6c75d15ed4de4ef91f@git.kernel.org
Cc: K. Y. Srinivasan
Signed-off-by: H. Peter Anvin
09 Feb, 2013
2 commits
-
Based on the amount of memory being managed set a floor on how low the
guest can be ballooned.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Delay reporting memory pressure by a specified amount of time.
This addresses the problem where the host may take memory balancing
decisions based on incorrect memory pressure data that will be posted
as soon as the balloon driver is loaded.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman
30 Jan, 2013
1 commit
-
The host expects that the pressure report includes the pressure due to the
pages that have been ballooned. Make necessary adjustments to reflect that.
Also, include the free memory information in the pressure report.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
26 Jan, 2013
4 commits
-
This pulls in all of the 3.8-rc5 fixes into this branch so we can test easier.
Signed-off-by: Greg Kroah-Hartman
-
Execute the shutdown code in a thread context. With recent changes made to the
shutdown code, shutdown code cannot be invoked from an interrupt context.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Use the consolidated GUID definitions in the util and balloon drivers.
Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Consolidate all GUID definitions in hyperv.h and use these definitions in implementing
channel bindings (as far as interrupt delivery goes).Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman
19 Jan, 2013
2 commits
-
The default interrupt delivery model in Linux does not support the Hyper-V
vmbus delivery model when the guest is configured with multiple VCPUs. I have
sent a patch to address this - delivering the vmbus interrupt on a separate
IDT vector. Until this patch is applied, bind all vmbus interrupts to the boot
CPU.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Fengguang Wu
Signed-off-by: Greg Kroah-Hartman
18 Jan, 2013
8 commits
-
The send buffer was being leaked; fix it.
Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Reported-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Greg Kroah-Hartman -
There is bug in the definition of struct dm_info_msg. This patch fixes
the definition of this structure and makes the corresponding adjustments.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
The variable userlen is initialized but never used
otherwise, so remove the unused variable.Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman -
Now, cleanup and consolidate reporting of host and vmbus version numbers.
Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Capture the host build information so it can be presented along with the
negotiated vmbus version information.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Implement flow management on the send side. When the sender is blocked, the reader
can potentially signal the sender to indicate there is now room to send.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
Now that we have implemented all of the Win8 (WS2012) functionality, negotiate
Win8 protocol with the host.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman -
We establish the handler before we have fully initialized the VMBUS state.
Deal with spurious interrupts.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Signed-off-by: Greg Kroah-Hartman