From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH v2 7/7] hv: add kernel patch Date: Wed, 25 Mar 2015 11:11:25 -0700 Message-ID: <1427307085-5493-8-git-send-email-shemming@brocade.com> References: <1427307085-5493-1-git-send-email-shemming@brocade.com> Cc: dev-VfR2kkLFssw@public.gmane.org To: simonxiaolinux-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org, alexmay-0li6OtcxBFHby3iVrkZq2A@public.gmane.org, kys-0li6OtcxBFHby3iVrkZq2A@public.gmane.org Return-path: In-Reply-To: <1427307085-5493-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" From: Stephen Hemminger For users using non latest kernels, put kernel patch in for them to use. Signed-off-by: Stephen Hemminger --- .../linuxapp/hv_uio/vmbus-get-pages.patch | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lib/librte_eal/linuxapp/hv_uio/vmbus-get-pages.patch diff --git a/lib/librte_eal/linuxapp/hv_uio/vmbus-get-pages.patch b/lib/librte_eal/linuxapp/hv_uio/vmbus-get-pages.patch new file mode 100644 index 0000000..e1a4b13 --- /dev/null +++ b/lib/librte_eal/linuxapp/hv_uio/vmbus-get-pages.patch @@ -0,0 +1,53 @@ +hyper-v: allow access to vmbus from userspace driver + +This is patch from to allow access to hyper-v vmbus from UIO driver. + +Signed-off-by: Stas Egorov +Signed-off-by: Stephen Hemminger + +--- +v2 - simplify and rename to vmbus_get_monitor_pages + + drivers/hv/connection.c | 20 +++++++++++++++++--- + include/linux/hyperv.h | 3 +++ + 2 files changed, 20 insertions(+), 3 deletions(-) + +--- a/drivers/hv/connection.c ++++ b/drivers/hv/connection.c +@@ -64,6 +64,15 @@ + } + } + ++void vmbus_get_monitor_pages(unsigned long *int_page, ++ unsigned long monitor_pages[2]) ++{ ++ *int_page = (unsigned long)vmbus_connection.int_page; ++ monitor_pages[0] = (unsigned long)vmbus_connection.monitor_pages[0]; ++ monitor_pages[1] = (unsigned long)vmbus_connection.monitor_pages[1]; ++} ++EXPORT_SYMBOL_GPL(vmbus_get_monitor_pages); ++ + static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, + __u32 version) + { +@@ -327,8 +336,6 @@ + else + bytes_to_read = 0; + } while (read_state && (bytes_to_read != 0)); +- } else { +- pr_err("no channel callback for relid - %u\n", relid); + } + + spin_unlock_irqrestore(&channel->inbound_lock, flags); +--- a/include/linux/hyperv.h ++++ b/include/linux/hyperv.h +@@ -1162,6 +1162,9 @@ + + extern void vmbus_ontimer(unsigned long data); + ++extern void vmbus_get_monitor_pages(unsigned long *int_page, ++ unsigned long monitor_pages[2]); ++ + /* Base driver object */ + struct hv_driver { + const char *name; -- 2.1.4