search for: vhost_dev_stop

Displaying 20 results from an estimated 187 matches for "vhost_dev_stop".

2017 Dec 24
2
[PATCH] vhost: remove unused lock check flag in vhost_dev_cleanup()
...-git a/drivers/vhost/net.c b/drivers/vhost/net.c index c7bdeb655646..a354d8d731e3 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -996,7 +996,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 71517b3c5558..797d08916553 100644 --- a/drivers/vhost/scsi.c +++ b/drivers...
2015 Apr 17
0
[PATCH] Revert "vhost: fix release path lockdep checks"
...-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7d137a4..26c4837 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/...
2015 Apr 17
0
[PATCH RESEND] Revert "vhost: fix release path lockdep checks"
...-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7d137a4..26c4837 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/...
2015 Apr 17
0
[PATCH] Revert "vhost: fix release path lockdep checks"
...-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7d137a4..26c4837 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/...
2015 Apr 17
0
[PATCH RESEND] Revert "vhost: fix release path lockdep checks"
...-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7d137a4..26c4837 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -793,7 +793,7 @@ static int vhost_net_release(struct inode *inode, struct file *f) vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); - vhost_dev_cleanup(&n->dev, false); + vhost_dev_cleanup(&n->dev); vhost_net_vq_reset(n); if (tx_sock) sockfd_put(tx_sock); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..c6640d3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) > > > memory->nregions = 0; > > > RCU_INIT_POINTER(dev->memory, memory); > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_reset_owner); > > > > > > void vhost_dev_stop(struct vhost_dev *dev) > > > { > > > @@ -412,6 +426,7 @@ void vhost_dev_stop(struct vhost_dev *dev) > > > } > > > } > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_stop); > > > > > > /* Caller should have device mutex if a...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...,7 @@ void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_memory *memory) > > > memory->nregions = 0; > > > RCU_INIT_POINTER(dev->memory, memory); > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_reset_owner); > > > > > > void vhost_dev_stop(struct vhost_dev *dev) > > > { > > > @@ -412,6 +426,7 @@ void vhost_dev_stop(struct vhost_dev *dev) > > > } > > > } > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_stop); > > > > > > /* Caller should have device mutex if a...
2019 Oct 07
0
[PATCH] vhost/test: stop device before reset
...iff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 04edd8db62fc..e3a8e9db22cd 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -170,6 +170,7 @@ static int vhost_test_release(struct inode *inode, struct file *f) vhost_test_stop(n, &private); vhost_test_flush(n); + vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev); /* We do an extra flush before freeing memory, * since jobs can re-queue themselves. */ @@ -246,6 +247,7 @@ static long vhost_test_reset_owner(struct vhost_test *n) } vhost_test_stop(n, &priv); vhost_test_flush(n); + vhost_dev_sto...
2019 Oct 26
0
[PATCH AUTOSEL 5.3 57/99] vhost/test: stop device before reset
...f --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 7804869c6a313..056308008288c 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -161,6 +161,7 @@ static int vhost_test_release(struct inode *inode, struct file *f) vhost_test_stop(n, &private); vhost_test_flush(n); + vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev); /* We do an extra flush before freeing memory, * since jobs can re-queue themselves. */ @@ -237,6 +238,7 @@ static long vhost_test_reset_owner(struct vhost_test *n) } vhost_test_stop(n, &priv); vhost_test_flush(n); + vhost_dev_sto...
2019 Oct 26
0
[PATCH AUTOSEL 4.19 39/59] vhost/test: stop device before reset
...f --git a/drivers/vhost/test.c b/drivers/vhost/test.c index a9be2d8e98df7..55090d9f9de0d 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -162,6 +162,7 @@ static int vhost_test_release(struct inode *inode, struct file *f) vhost_test_stop(n, &private); vhost_test_flush(n); + vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev); /* We do an extra flush before freeing memory, * since jobs can re-queue themselves. */ @@ -238,6 +239,7 @@ static long vhost_test_reset_owner(struct vhost_test *n) } vhost_test_stop(n, &priv); vhost_test_flush(n); + vhost_dev_sto...
2013 Mar 22
0
[PATCH] tcm_vhost: Use vs for struct vhost_scsi
...ct vhost_scsi *s = f->private_data; + struct vhost_scsi *vs = f->private_data; struct vhost_scsi_target t; - mutex_lock(&s->dev.mutex); - memcpy(t.vhost_wwpn, s->vs_vhost_wwpn, sizeof(t.vhost_wwpn)); - mutex_unlock(&s->dev.mutex); - vhost_scsi_clear_endpoint(s, &t); - vhost_dev_stop(&s->dev); - vhost_dev_cleanup(&s->dev, false); - kfree(s); + mutex_lock(&vs->dev.mutex); + memcpy(t.vhost_wwpn, vs->vs_vhost_wwpn, sizeof(t.vhost_wwpn)); + mutex_unlock(&vs->dev.mutex); + vhost_scsi_clear_endpoint(vs, &t); + vhost_dev_stop(&vs->dev); + vhos...
2013 Mar 22
0
[PATCH] tcm_vhost: Use vs for struct vhost_scsi
...ct vhost_scsi *s = f->private_data; + struct vhost_scsi *vs = f->private_data; struct vhost_scsi_target t; - mutex_lock(&s->dev.mutex); - memcpy(t.vhost_wwpn, s->vs_vhost_wwpn, sizeof(t.vhost_wwpn)); - mutex_unlock(&s->dev.mutex); - vhost_scsi_clear_endpoint(s, &t); - vhost_dev_stop(&s->dev); - vhost_dev_cleanup(&s->dev, false); - kfree(s); + mutex_lock(&vs->dev.mutex); + memcpy(t.vhost_wwpn, vs->vs_vhost_wwpn, sizeof(t.vhost_wwpn)); + mutex_unlock(&vs->dev.mutex); + vhost_scsi_clear_endpoint(vs, &t); + vhost_dev_stop(&vs->dev); + vhos...
2023 Mar 10
0
[PATCH] vhost-vdpa: cleanup memory maps when closing vdpa fds
...*d = &v->vdev; > > > > > > > > mutex_lock(&d->mutex); > > > > filep->private_data = NULL; > > > > vhost_vdpa_clean_irq(v); > > > > vhost_vdpa_reset(v); > > > > vhost_dev_stop(&v->vdev); > > > > vhost_vdpa_free_domain(v); > > > > vhost_vdpa_config_put(v); > > > > vhost_vdpa_cleanup(v); > > > > mutex_unlock(&d->mutex); > > > > > > > > at...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...em; /* We don't need VQ locks below since vhost_dev_cleanup makes sure * VQs aren't running. */ for (i = 0; i < dev->nvqs; ++i) - dev->vqs[i]->memory = memory; + dev->vqs[i]->umem = umem; } EXPORT_SYMBOL_GPL(vhost_dev_reset_owner); @@ -523,6 +537,19 @@ void vhost_dev_stop(struct vhost_dev *dev) } EXPORT_SYMBOL_GPL(vhost_dev_stop); +static void vhost_umem_clean(struct vhost_dev *dev) +{ + struct vhost_umem_node *node, *tmp; + struct vhost_umem *umem = dev->umem; + + list_for_each_entry_safe(node, tmp, &umem->umem_list, link) { + vhost_umem_interval_tre...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...em; /* We don't need VQ locks below since vhost_dev_cleanup makes sure * VQs aren't running. */ for (i = 0; i < dev->nvqs; ++i) - dev->vqs[i]->memory = memory; + dev->vqs[i]->umem = umem; } EXPORT_SYMBOL_GPL(vhost_dev_reset_owner); @@ -523,6 +537,19 @@ void vhost_dev_stop(struct vhost_dev *dev) } EXPORT_SYMBOL_GPL(vhost_dev_stop); +static void vhost_umem_clean(struct vhost_dev *dev) +{ + struct vhost_umem_node *node, *tmp; + struct vhost_umem *umem = dev->umem; + + list_for_each_entry_safe(node, tmp, &umem->umem_list, link) { + vhost_umem_interval_tre...
2023 Mar 21
1
[PATCH v3 2/8] vhost-vdpa: use bind_mm/unbind_mm device callbacks
...nd_mm(v); + if (r) + vhost_dev_reset_owner(d, NULL); + break; default: r = vhost_dev_ioctl(&v->vdev, cmd, argp); if (r == -ENOIOCTLCMD) @@ -1287,6 +1317,7 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep) vhost_vdpa_clean_irq(v); vhost_vdpa_reset(v); vhost_dev_stop(&v->vdev); + vhost_vdpa_unbind_mm(v); vhost_vdpa_config_put(v); vhost_vdpa_cleanup(v); mutex_unlock(&d->mutex); -- 2.39.2
2013 Jul 07
0
[PATCH v2 03/11] vhost: Make vhost a separate module
...er(struct vhost_dev *dev, struct vhost_memory *memory) > > > > memory->nregions = 0; > > > > RCU_INIT_POINTER(dev->memory, memory); > > > > } > > > > +EXPORT_SYMBOL_GPL(vhost_dev_reset_owner); > > > > > > > > void vhost_dev_stop(struct vhost_dev *dev) > > > > { > > > > @@ -412,6 +426,7 @@ void vhost_dev_stop(struct vhost_dev *dev) > > > > } > > > > } > > > > } > > > > +EXPORT_SYMBOL_GPL(vhost_dev_stop); > > > > > > > >...
2012 Jul 24
2
[PATCH 0/2] vhost-scsi: Check for tcm_vhost ABI version
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Anthony, Here are the two patches against Zhi's vhost-scsi tree to check for a supported version (VHOST_SCSI_ABI_VERSION=1) that's now exposed via the tcm_vhost ioctl. Please have a look and let me know if this is what you had in mind. Thanks! Nicholas Bellinger (2): vhost-scsi: Rename vhost_vring_target ->
2012 Jul 24
2
[PATCH 0/2] vhost-scsi: Check for tcm_vhost ABI version
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Anthony, Here are the two patches against Zhi's vhost-scsi tree to check for a supported version (VHOST_SCSI_ABI_VERSION=1) that's now exposed via the tcm_vhost ioctl. Please have a look and let me know if this is what you had in mind. Thanks! Nicholas Bellinger (2): vhost-scsi: Rename vhost_vring_target ->
2013 May 03
4
[PATCH 0/3] vhost cleanups and separate module
Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module drivers/vhost/Kconfig | 8 ++++++++ drivers/vhost/Makefile | 3 ++- drivers/vhost/net.c | 6 ++++++ drivers/vhost/scsi.c | 1 - drivers/vhost/vhost.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- drivers/vhost/vhost.h | 8 ++------ 6