Commit Graph

12 Commits

Author SHA1 Message Date
K. Y. Srinivasan db11f12a11 Drivers: hv: Manage event tasklets on per-cpu basis
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-17 11:39:15 -08:00
K. Y. Srinivasan 9acd6442c6 Drivers: hv: Get rid of the unused global signaling state
Now that we have implemented a per-connection signaling mechanism, get rid
of the global signaling state. For hosts that don't support per-connection
signaling handle, we have moved the global state to be a per-channel state.

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-17 11:39:15 -08:00
K. Y. Srinivasan 917ea427c7 Drivers: hv: Setup a mapping for Hyper-V's notion cpu ID
On win8 (ws2012), incoming vmbus interrupt load can be spread across all
available VCPUs in the guest. On a per-channel basis, the interrupts can
be bound to specific CPUs. The Linux notion of cpu ID may be different
from that of the hypervisor's. Setup a mapping structure.

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-17 11:34:37 -08:00
K. Y. Srinivasan 1f42248d72 Drivers: hv: Change the signature for hv_signal_event()
In preparation for implementing a per-connection signaling framework,
change the signature of the function hv_signal_event(). The current
code uses a global handle for signaling the host.

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-17 11:34:36 -08:00
Jason Wang 0592969e73 hv: fail the probing immediately when we are not in hyperv platform
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-17 09:51:59 -07:00
K. Y. Srinivasan 83ba0c4f3f Drivers: hv: Cleanup the guest ID computation
The current guest ID string in use in vmbus driver does not conform
to the MSFT guidelines on guest ID. MSFT currently does not specify
Linux specific guidelines. MSFT however has plans to publish Linux
specific guidelines. This implementation conforms to the yet unpublished
Linux specific guidelines for guest ID. This implementation also broadly
conforms to the current guidelines as well.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Bjørn Mork <bjorn@mork.no>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 18:42:25 -07:00
Dan Carpenter 415f0a02ad hv: fix return type of hv_post_message()
This function returns negative error codes, but because the type is u16
they get truncated into positive numbers.  It doesn't look like the
callers care, but we should fix it anyway as a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-09 15:05:47 -07:00
K. Y. Srinivasan 14c1bf8a89 drivers: hv: Increase the number of VCPUs supported in the guest
The current code arbirarily limited the number of CPUs the guest could have.
Change that so that we can support the maximum number of CPUs the guest can
support. While we use NR_CPUS to size the per-cpu state all we are allocating
based on NR_CPUS are the  pointers to per-cpu state that will be allocatted in
the context of the initializing CPU. This patch triggers a checkpatch warning
for the usage of NR_CPU and since all we are allocating a couple of pointers
per CPU, it should be ok.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 08:32:44 -08:00
K. Y. Srinivasan 175cad2667 Drivers: hv: Get rid of an unnecessary check in hv.c
In preparation for eventually supporting kexec in Linux VMs on Hyper-V,
get rid of an unnecessary check in hv_init().

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-12 14:27:19 -08:00
K. Y. Srinivasan 93e5bd06a9 Drivers: hv: Make the vmbus driver unloadable
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-12 14:26:50 -08:00
Greg Kroah-Hartman 407dd16443 Staging: hv: remove unneeded asm include file in hyperv.h
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-11 08:49:19 -06:00
Greg Kroah-Hartman 46a9719136 Staging: hv: move hyperv code out of staging directory
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>
2011-10-10 22:52:55 -06:00