summaryrefslogtreecommitdiffstats
path: root/drivers/hv/hyperv_vmbus.h
Commit message (Collapse)AuthorAgeFilesLines
* Drivers: hv: Implement the file copy serviceK. Y. Srinivasan2014-02-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the file copy service for Linux guests on Hyper-V. This permits the host to copy a file (over VMBUS) into the guest. This facility is part of "guest integration services" supported on the Windows platform. Here is a link that provides additional details on this functionality: http://technet.microsoft.com/en-us/library/dn464282.aspx In V1 version of the patch I have addressed comments from Olaf Hering <olaf@aepfle.de> and Dan Carpenter <dan.carpenter@oracle.com> In V2 version of this patch I did some minor cleanup (making some globals static). In V4 version of the patch I have addressed all of Olaf's most recent set of comments/concerns. In V5 version of the patch I had addressed Greg's most recent comments. I would like to thank Greg for suggesting that I use misc device; it has significantly simplified the code. In V6 version of the patch I have cleaned up error message based on Olaf's comments. I have also rebased the patch based on the current tip. In this version of the patch, I have addressed the latest comments from Greg. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: hv: vmbus: Cleanup the packet send pathK. Y. Srinivasan2014-02-071-2/+2
| | | | | | | | | The current channel code is using scatterlist abstraction to pass data to the ringbuffer API on the send path. This causes unnecessary translations between virtual and physical addresses. Fix this. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hv: delete struct hv_dev_port_infoGreg Kroah-Hartman2013-09-261-0/+7
| | | | | | | | | 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" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hv: make "monitor_pages" a "real" pointer arrayGreg Kroah-Hartman2013-09-261-1/+1
| | | | | | | | | | | 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" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: hv: allocate synic structures before hv_synic_init()Jason Wang2013-06-241-0/+4
| | | | | | | | | | | | | 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 <haiyangz@microsoft.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: hv: Capture the host build informationK. Y. Srinivasan2013-01-171-0/+7
| | | | | | | | | Capture the host build information so it can be presented along with the negotiated vmbus version information. 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>
* Drivers: hv: Implement flow management on the send sideK. Y. Srinivasan2013-01-171-1/+1
| | | | | | | | | 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 <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: hv: Manage event tasklets on per-cpu basisK. Y. Srinivasan2013-01-171-0/+6
| | | | | | | | | 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>
* Drivers: hv: Get rid of the unused global signaling stateK. Y. Srinivasan2013-01-171-8/+0
| | | | | | | | | | 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>
* Drivers: hv: Setup a mapping for Hyper-V's notion cpu IDK. Y. Srinivasan2013-01-171-0/+10
| | | | | | | | | | | 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>
* Drivers: hv: Manage signaling state on a per-connection basisK. Y. Srinivasan2013-01-171-21/+0
| | | | | | | | | | The current code has a global handle for supporting signaling of the host from guest. Make this a per-channel attribute as on some versions of the host we can signal on per-channel handle. 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>
* Drivers: hv: Change the signature of vmbus_set_event()K. Y. Srinivasan2013-01-171-1/+1
| | | | | | | | | | In preparation for supporting a per-connection signaling mechanism, change the signature of vmbus_set_event(). This change is also needed to implement other aspects of the signaling optimization. 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>
* Drivers: hv: Change the signature for hv_signal_event()K. Y. Srinivasan2013-01-171-1/+1
| | | | | | | | | | 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>
* Drivers: hv: Get rid of hv_get_ringbuffer_interrupt_mask()K. Y. Srinivasan2013-01-171-1/+0
| | | | | | | | This function is no longer used; 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>
* Drivers: hv: Optimize the signaling on the write pathK. Y. Srinivasan2013-01-171-1/+1
| | | | | | | | | The host has already implemented the "read" side optimizations. Leverage that to optimize "write" side signaling. 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>
* Drivers: hv: Implement routines for read side signaling optimizationK. Y. Srinivasan2013-01-171-0/+4
| | | | | | | | | | | | Implement functions that will support read-side signaling optimization. By having the reader indicate the start of the "read" operation and the "end" of the read operation we can more efficiently handle the signaling protocol: while the read is in progress, there is no need for the "writer" to signal the "reader" as new items are put on the read queue. 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>
* Drivers: hv: Cleanup the guest ID computationK. Y. Srinivasan2012-08-131-4/+43
| | | | | | | | | | | | | | | 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>
* Drivers: hv: Change the hex constant to a decimal constantK. Y. Srinivasan2012-07-191-1/+1
| | | | | | | | | | | The hex constant chosen for HV_LINUX_GUEST_ID_HI was offensive, update to use the decimal equivalent instead. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hv: fix return type of hv_post_message()Dan Carpenter2012-04-091-1/+1
| | | | | | | | | | 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>
* drivers: hv: Increase the number of VCPUs supported in the guestK. Y. Srinivasan2012-02-091-3/+2
| | | | | | | | | | | | | | 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>
* Drivers: hv: Make the vmbus driver unloadableK. Y. Srinivasan2011-12-121-0/+1
| | | | | | | | | 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>
* Staging: hv: remove last user of DPRINT() macroGreg Kroah-Hartman2011-10-111-2/+0
| | | | | | | This also removed the unused function hv_dump_ring_info(). Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: move hyperv code out of staging directoryGreg Kroah-Hartman2011-10-101-0/+628
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>
OpenPOWER on IntegriCloud