aboutsummaryrefslogtreecommitdiff
path: root/drivers/hv/vmbus_drv.c
AgeCommit message (Collapse)Author
2013-07-21drivers: hv: switch to use mb() instead of smp_mb()Jason Wang
commit 35848f68b07df3f917cb13fc3c134718669f569b upstream. 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 <jasowang@redhat.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-27Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interruptsK. Y. Srinivasan
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 interrupts Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18Drivers: hv: vmbus_flow_handler() can be staticFengguang Wu
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17Drivers: hv: Add a check to deal with spurious interruptsK. Y. Srinivasan
We establish the handler before we have fully initialized the VMBUS state. Deal with spurious interrupts. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17Drivers: hv: Handle vmbus interrupts concurrently on all cpusK. Y. Srinivasan
Vmbus interrupts are unique in that while the interrupt is delivered on a given vector, these can be handled concurrently on different CPUs. Handle the vmbus interrupts concurrently on all the CPUs. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17Drivers: hv: Manage event tasklets on per-cpu basisK. Y. Srinivasan
Now that we can potentially take vmbus interrupts on any CPU, make the tasklets per-CPU. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17Drivers: hv: Get rid of unnecessary request for offersK. Y. Srinivasan
This call to seek offers is not necessary and just adds unnecessary delay. Get rid of it. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17Drivers: hv: Modify the interrupt handling code to support win8 and beyondK. Y. Srinivasan
Starting with Win8 (WS2012), the event page can be used to directly get the channel ID that needs servicing. Modify the channel event handling code to take advantage of this feature. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04hv: vmbus_drv: detect hyperv through x86_hyperJason Wang
There are two reasons we need to use x86_hyper instead of query_hypervisor_presence(): - Not only hyperv but also other hypervisors such as kvm would set X86_FEATURE_HYTPERVISOR, so query_hypervisor_presence() will return true even in kvm. This may cause extra delay of 5 seconds before failing the probing in kvm guest. - The hypervisor has been detected in init_hypervisor(), so no need to do the work again. Signed-off-by: Jason Wang <jasowang@redhat.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17hv: fail the probing immediately when we are not in hyperv platformJason Wang
We wait for about 5 seconds for the success of the hyperv registration even if we were not in hyperv platform. This is suboptimal, so the patch check the cpuid in the beginning of hv_acpi_init() instead of in vmbus_bus_init() to fail the probing immediately. Signed-off-by: Jason Wang <jasowang@redhat.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13Drivers: hv: vmbus: Use the standard format string to format GUIDsK. Y. Srinivasan
Format GUIDS as per MSFT standard. This makes interacting with MSFT tool stack easier. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-opTheodore Ts'o
With the changes in the random tree, IRQF_SAMPLE_RANDOM is now a no-op; interrupt randomness is now collected unconditionally in a very low-overhead fashion; see commit 775f4b297b. The IRQF_SAMPLE_RANDOM flag was scheduled to be removed in 2009 on the feature-removal-schedule, so this patch is preparation for the final removal of this flag. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com>
2012-01-04Drivers:hv: Fix a bug in vmbus_driver_unregister()K. Y. Srinivasan
The function vmbus_exists() was introduced recently to deal with cases where the vmbus driver failed to initialize and yet other Hyper-V drivers attempted to register with the vmbus bus driver. This patch introduced a bug where vmbus_driver_unregister() would fail to unregister the driver. This patch fixes the problem. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Fuzhou Chen <fuzhouch@microsoft.com> Cc: Sasha Levin <levinsasha928@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-12Drivers: hv: Make the vmbus driver unloadableK. Y. Srinivasan
It turns out that the vmbus driver can be made unloadable. Make it unloadable. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09drivers: hv: Don't OOPS when you cannot init vmbusK. Y. Srinivasan
The hv vmbus driver was causing an OOPS since it was trying to register drivers on top of the bus even if initialization of the bus has failed for some reason (such as the odd chance someone would run a hv enabled kernel in a non-hv environment). Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26Staging: hv: vmbus: Support building the vmbus driver as part of the kernelK. Y. Srinivasan
Modify the way we initialize the vmbus driver so that all the hyper-v drivers can be linked with the kernel and still ensure that the vmbus driver is fully initialized before the drivers that depend upon the vmbus driver attempt to initialize. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11hv: remove struct hv_device_info from hyperv.hGreg Kroah-Hartman
This is only used/needed by the vmbus core code, so move it out of the hyperv.h file and into the .c file that uses it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: hv: remove vmbus_loglevel as it is not used at all anymoreGreg Kroah-Hartman
As there is no user of this variable, it's time to delete it. For dynamic debugging of the hyperv code, use the standard dynamic debug kernel interface. Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: hv: remove unneeded asm include file in hyperv.hGreg Kroah-Hartman
No one outside of the hyperv core needs to include the asm/hyperv.h file, so don't put it in the "global" include/linux/hyperv.h file. Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-10Staging: hv: move hyperv code out of staging directoryGreg Kroah-Hartman
After many years wandering the desert, it is finally time for the Microsoft HyperV code to move out of the staging directory. Or at least the core hyperv bus code, and the utility driver, the rest still have some review to get through by the various subsystem maintainers. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>