From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzZSB-0000Gt-PT for qemu-devel@nongnu.org; Thu, 19 Nov 2015 19:21:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzZS7-0003EQ-1c for qemu-devel@nongnu.org; Thu, 19 Nov 2015 19:21:27 -0500 Received: from mail.kernel.org ([198.145.29.136]:44477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzZS6-0003E9-SM for qemu-devel@nongnu.org; Thu, 19 Nov 2015 19:21:22 -0500 From: Ming Lin Date: Thu, 19 Nov 2015 16:21:00 -0800 Message-Id: <1447978868-17138-2-git-send-email-mlin@kernel.org> In-Reply-To: <1447978868-17138-1-git-send-email-mlin@kernel.org> References: <1447978868-17138-1-git-send-email-mlin@kernel.org> Subject: [Qemu-devel] [RFC PATCH 1/9] nvme-vhost: add initial commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: linux-nvme@lists.infradead.org Cc: Ming Lin , Christoph Hellwig , qemu-devel@nongnu.org, "Nicholas A. Bellinger" , virtualization@lists.linux-foundation.org From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/Kconfig | 11 +++++++++++ drivers/nvme/target/Makefile | 2 ++ drivers/nvme/target/vhost.c | 16 ++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 drivers/nvme/target/vhost.c diff --git a/drivers/nvme/target/Kconfig b/drivers/nvme/target/Kconfig index 1bf92db..22760f5 100644 --- a/drivers/nvme/target/Kconfig +++ b/drivers/nvme/target/Kconfig @@ -12,3 +12,14 @@ config NVME_TARGET_LOOP to test NVMe host and target side features. If unsure, say N. + +config NVME_TARGET_VHOST + tristate "NVMe vhost support" + depends on BLK_DEV_NVME + select NVME_TARGET + select VHOST + select VHOST_RING + help + This enabled the NVMe vhost support. + + If unsure, say N. diff --git a/drivers/nvme/target/Makefile b/drivers/nvme/target/Makefile index 21e9134..1d8d523 100644 --- a/drivers/nvme/target/Makefile +++ b/drivers/nvme/target/Makefile @@ -1,6 +1,8 @@ obj-$(CONFIG_NVME_TARGET) += nvmet.o obj-$(CONFIG_NVME_TARGET_LOOP) += nvme-loop.o +obj-$(CONFIG_NVME_TARGET_VHOST) += nvme-vhost.o nvmet-y += core.o configfs.o admin-cmd.o io-cmd.o nvme-loop-y += loop.o +nvme-vhost-y += vhost.o diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c new file mode 100644 index 0000000..623af00 --- /dev/null +++ b/drivers/nvme/target/vhost.c @@ -0,0 +1,16 @@ +#include + +static int __init nvmet_vhost_init(void) +{ + return 0; +} +module_init(nvmet_vhost_init); + +static void nvmet_vhost_exit(void) +{ +} +module_exit(nvmet_vhost_exit); + +MODULE_AUTHOR("Ming Lin "); +MODULE_LICENSE("GPL v2"); + -- 1.9.1