Drivers: hv: Implement the file copy service

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>
This commit is contained in:
K. Y. Srinivasan
2014-02-16 11:34:30 -08:00
committed by Greg Kroah-Hartman
parent e0270addae
commit 01325476d6
7 changed files with 682 additions and 2 deletions

View File

@@ -30,7 +30,6 @@
#include <linux/types.h>
#include <linux/scatterlist.h>
#include <linux/list.h>
#include <linux/uuid.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/completion.h>
@@ -1049,6 +1048,17 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver);
0xB7, 0x6B, 0x6F, 0xD0, 0xBE, 0x52, 0x8C, 0xDA \
}
/*
* Guest File Copy Service
* {34D14BE3-DEE4-41c8-9AE7-6B174977C192}
*/
#define HV_FCOPY_GUID \
.guid = { \
0xE3, 0x4B, 0xD1, 0x34, 0xE4, 0xDE, 0xC8, 0x41, \
0x9A, 0xE7, 0x6B, 0x17, 0x49, 0x77, 0xC1, 0x92 \
}
/*
* Common header for Hyper-V ICs
*/