Re: [PATCH v2] Revert "Merge branch 'vsock-virtio'"

2015-12-08 Thread David Miller
From: Stefan Hajnoczi 
Date: Wed,  9 Dec 2015 10:51:12 +0800

> This reverts commit 0d76d6e8b2507983a2cae4c09880798079007421 and merge
> commit c402293bd76fbc93e52ef8c0947ab81eea3ae019, reversing changes made
> to c89359a42e2a49656451569c382eed63e781153c.
> 
> The virtio-vsock device specification is not finalized yet.  Michael
> Tsirkin voiced concerned about merging this code when the hardware
> interface (and possibly the userspace interface) could still change.
> 
> Signed-off-by: Stefan Hajnoczi 
> ---
> v2:
>  * Revert merge commit and coccinelle fixup in a single patch

Applied, th anks.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] Revert "Merge branch 'vsock-virtio'"

2015-12-08 Thread Stefan Hajnoczi
This reverts commit 0d76d6e8b2507983a2cae4c09880798079007421 and merge
commit c402293bd76fbc93e52ef8c0947ab81eea3ae019, reversing changes made
to c89359a42e2a49656451569c382eed63e781153c.

The virtio-vsock device specification is not finalized yet.  Michael
Tsirkin voiced concerned about merging this code when the hardware
interface (and possibly the userspace interface) could still change.

Signed-off-by: Stefan Hajnoczi 
---
v2:
 * Revert merge commit and coccinelle fixup in a single patch

 drivers/vhost/Kconfig   |4 -
 drivers/vhost/Kconfig.vsock |7 -
 drivers/vhost/Makefile  |4 -
 drivers/vhost/vsock.c   |  630 ---
 drivers/vhost/vsock.h   |4 -
 include/linux/virtio_vsock.h|  209 -
 include/net/af_vsock.h  |2 -
 include/uapi/linux/virtio_ids.h |1 -
 include/uapi/linux/virtio_vsock.h   |   89 ---
 net/vmw_vsock/Kconfig   |   18 -
 net/vmw_vsock/Makefile  |2 -
 net/vmw_vsock/af_vsock.c|   70 --
 net/vmw_vsock/virtio_transport.c|  466 ---
 net/vmw_vsock/virtio_transport_common.c | 1272 ---
 14 files changed, 2778 deletions(-)
 delete mode 100644 drivers/vhost/Kconfig.vsock
 delete mode 100644 drivers/vhost/vsock.c
 delete mode 100644 drivers/vhost/vsock.h
 delete mode 100644 include/linux/virtio_vsock.h
 delete mode 100644 include/uapi/linux/virtio_vsock.h
 delete mode 100644 net/vmw_vsock/virtio_transport.c
 delete mode 100644 net/vmw_vsock/virtio_transport_common.c

diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index 81449bf..533eaf0 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -47,7 +47,3 @@ config VHOST_CROSS_ENDIAN_LEGACY
  adds some overhead, it is disabled by default.
 
  If unsure, say "N".
-
-if STAGING
-source "drivers/vhost/Kconfig.vsock"
-endif
diff --git a/drivers/vhost/Kconfig.vsock b/drivers/vhost/Kconfig.vsock
deleted file mode 100644
index 3491865..000
--- a/drivers/vhost/Kconfig.vsock
+++ /dev/null
@@ -1,7 +0,0 @@
-config VHOST_VSOCK
-   tristate "vhost virtio-vsock driver"
-   depends on VSOCKETS && EVENTFD
-   select VIRTIO_VSOCKETS_COMMON
-   default n
-   ---help---
-   Say M here to enable the vhost-vsock for virtio-vsock guests
diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
index 6b012b9..e0441c3 100644
--- a/drivers/vhost/Makefile
+++ b/drivers/vhost/Makefile
@@ -4,9 +4,5 @@ vhost_net-y := net.o
 obj-$(CONFIG_VHOST_SCSI) += vhost_scsi.o
 vhost_scsi-y := scsi.o
 
-obj-$(CONFIG_VHOST_VSOCK) += vhost_vsock.o
-vhost_vsock-y := vsock.o
-
 obj-$(CONFIG_VHOST_RING) += vringh.o
-
 obj-$(CONFIG_VHOST)+= vhost.o
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
deleted file mode 100644
index 64bcb10..000
--- a/drivers/vhost/vsock.c
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
- * vhost transport for vsock
- *
- * Copyright (C) 2013-2015 Red Hat, Inc.
- * Author: Asias He 
- * Stefan Hajnoczi 
- *
- * This work is licensed under the terms of the GNU GPL, version 2.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include "vhost.h"
-#include "vsock.h"
-
-#define VHOST_VSOCK_DEFAULT_HOST_CID   2
-
-static int vhost_transport_socket_init(struct vsock_sock *vsk,
-  struct vsock_sock *psk);
-
-enum {
-   VHOST_VSOCK_FEATURES = VHOST_FEATURES,
-};
-
-/* Used to track all the vhost_vsock instances on the system. */
-static LIST_HEAD(vhost_vsock_list);
-static DEFINE_MUTEX(vhost_vsock_mutex);
-
-struct vhost_vsock_virtqueue {
-   struct vhost_virtqueue vq;
-};
-
-struct vhost_vsock {
-   /* Vhost device */
-   struct vhost_dev dev;
-   /* Vhost vsock virtqueue*/
-   struct vhost_vsock_virtqueue vqs[VSOCK_VQ_MAX];
-   /* Link to global vhost_vsock_list*/
-   struct list_head list;
-   /* Head for pkt from host to guest */
-   struct list_head send_pkt_list;
-   /* Work item to send pkt */
-   struct vhost_work send_pkt_work;
-   /* Wait queue for send pkt */
-   wait_queue_head_t queue_wait;
-   /* Used for global tx buf limitation */
-   u32 total_tx_buf;
-   /* Guest contex id this vhost_vsock instance handles */
-   u32 guest_cid;
-};
-
-static u32 vhost_transport_get_local_cid(void)
-{
-   return VHOST_VSOCK_DEFAULT_HOST_CID;
-}
-
-static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
-{
-   struct vhost_vsock *vsock;
-
-   mutex_lock(_vsock_mutex);
-   list_for_each_entry(vsock, _vsock_list, list) {
-   if (vsock->guest_cid == guest_cid) {
-   mutex_unlock(_vsock_mutex);
-   return vsock;
-   }
-   }
-   mutex_unlock(_vsock_mutex);
-
-   return