search for: virtio_chan

Displaying 20 results from an estimated 31 matches for "virtio_chan".

2015 Mar 09
2
[PATCH] 9p/trans_virtio: fix hot-unplug
...et/9p/trans_virtio.c b/net/9p/trans_virtio.c index d8e376a..d1b2f306 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) static void p9_virtio_remove(struct virtio_device *vdev) { struct virtio_chan *chan = vdev->priv; - - if (chan->inuse) - p9_virtio_close(chan->client); - vdev->config->del_vqs(vdev); + unsigned long warning_time; + bool inuse; mutex_lock(&virtio_9p_lock); + + /* Remove self from list so we don't get new users. */ list_del(&chan->chan_list...
2015 Mar 09
2
[PATCH] 9p/trans_virtio: fix hot-unplug
...et/9p/trans_virtio.c b/net/9p/trans_virtio.c index d8e376a..d1b2f306 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) static void p9_virtio_remove(struct virtio_device *vdev) { struct virtio_chan *chan = vdev->priv; - - if (chan->inuse) - p9_virtio_close(chan->client); - vdev->config->del_vqs(vdev); + unsigned long warning_time; + bool inuse; mutex_lock(&virtio_9p_lock); + + /* Remove self from list so we don't get new users. */ list_del(&chan->chan_list...
2013 Dec 04
3
[PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
...o.org> --- net/9p/trans_virtio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9c5a1aa..5d1d04b 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, int count = nr_pages; while (nr_pages) { s = rest_of_page(data); - pages[index++] = kmap_to_page(data); + if (is_vmalloc_or_module_addr(data)) + pages[index++] = vmalloc_to_page(data); + else + pages[index++] = kmap_to_page(data); data += s; nr_pages--; } --...
2013 Dec 04
3
[PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
...o.org> --- net/9p/trans_virtio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9c5a1aa..5d1d04b 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, int count = nr_pages; while (nr_pages) { s = rest_of_page(data); - pages[index++] = kmap_to_page(data); + if (is_vmalloc_or_module_addr(data)) + pages[index++] = vmalloc_to_page(data); + else + pages[index++] = kmap_to_page(data); data += s; nr_pages--; } --...
2015 Mar 12
1
[PATCH] 9p/trans_virtio: fix hot-unplug
...d1b2f306 100644 > > --- a/net/9p/trans_virtio.c > > +++ b/net/9p/trans_virtio.c > > @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) > > static void p9_virtio_remove(struct virtio_device *vdev) > > { > > struct virtio_chan *chan = vdev->priv; > > - > > - if (chan->inuse) > > - p9_virtio_close(chan->client); > > - vdev->config->del_vqs(vdev); > > + unsigned long warning_time; > > + bool inuse; > > > > mutex_lock(&virtio_9p_lock); > > + >...
2015 Mar 12
1
[PATCH] 9p/trans_virtio: fix hot-unplug
...d1b2f306 100644 > > --- a/net/9p/trans_virtio.c > > +++ b/net/9p/trans_virtio.c > > @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) > > static void p9_virtio_remove(struct virtio_device *vdev) > > { > > struct virtio_chan *chan = vdev->priv; > > - > > - if (chan->inuse) > > - p9_virtio_close(chan->client); > > - vdev->config->del_vqs(vdev); > > + unsigned long warning_time; > > + bool inuse; > > > > mutex_lock(&virtio_9p_lock); > > + >...
2013 Dec 06
1
[PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
...e changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c >> index 9c5a1aa..5d1d04b 100644 >> --- a/net/9p/trans_virtio.c >> +++ b/net/9p/trans_virtio.c >> @@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, >> int count = nr_pages; >> while (nr_pages) { >> s = rest_of_page(data); >> - pages[index++] = kmap_to_page(data); >> + if (is_vmalloc_or_module_addr(data)) > > Can this really end up being a module address? Yes. Here is the stacktrace to...
2013 Dec 06
1
[PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
...e changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c >> index 9c5a1aa..5d1d04b 100644 >> --- a/net/9p/trans_virtio.c >> +++ b/net/9p/trans_virtio.c >> @@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, >> int count = nr_pages; >> while (nr_pages) { >> s = rest_of_page(data); >> - pages[index++] = kmap_to_page(data); >> + if (is_vmalloc_or_module_addr(data)) > > Can this really end up being a module address? Yes. Here is the stacktrace to...
2012 Oct 18
1
[PATCH] virtio: 9p: correctly pass physical address to userspace for high pages
...nate solution: masking out __GFP_HIGHMEM from the kmalloc of desc. If it fails, we will fall back to laying out the virtio request directly inside the ring; if it doesn't fit, we'll wait for the device to consume more buffers. > @@ -325,7 +326,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, > int count = nr_pages; > while (nr_pages) { > s = rest_of_page(data); > - pages[index++] = virt_to_page(data); > + pages[index++] = kmap_to_page(data); > data += s; > nr_pages--; > } This seems like a separate bug fix. Cheers, Rusty.
2012 Oct 18
1
[PATCH] virtio: 9p: correctly pass physical address to userspace for high pages
...nate solution: masking out __GFP_HIGHMEM from the kmalloc of desc. If it fails, we will fall back to laying out the virtio request directly inside the ring; if it doesn't fit, we'll wait for the device to consume more buffers. > @@ -325,7 +326,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, > int count = nr_pages; > while (nr_pages) { > s = rest_of_page(data); > - pages[index++] = virt_to_page(data); > + pages[index++] = kmap_to_page(data); > data += s; > nr_pages--; > } This seems like a separate bug fix. Cheers, Rusty.
2012 Oct 19
5
[PATCH v2 1/3] mm: highmem: export kmap_to_page for modules
Some virtio device drivers (9p) need to translate high virtual addresses to physical addresses, which are inserted into the virtqueue for processing by userspace. This patch exports the kmap_to_page symbol, so that the affected drivers can be compiled as modules. Signed-off-by: Will Deacon <will.deacon at arm.com> --- mm/highmem.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
2012 Oct 19
5
[PATCH v2 1/3] mm: highmem: export kmap_to_page for modules
Some virtio device drivers (9p) need to translate high virtual addresses to physical addresses, which are inserted into the virtqueue for processing by userspace. This patch exports the kmap_to_page symbol, so that the affected drivers can be compiled as modules. Signed-off-by: Will Deacon <will.deacon at arm.com> --- mm/highmem.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
2015 Jan 13
8
[PATCH 0/6] virtio: graceful failure with get == NULL
virtio 1.0 says device configuration is optional, but most drivers treat it as mandatory. Even if presented by device, guest bios might disable the BAR holding that configuration, so we can't assume it's there, but we also don't want to fail if not in case drivers can cope with it's absence - such as caif or rng. Add code to drivers to check presence of get callback and fail
2015 Jan 13
8
[PATCH 0/6] virtio: graceful failure with get == NULL
virtio 1.0 says device configuration is optional, but most drivers treat it as mandatory. Even if presented by device, guest bios might disable the BAR holding that configuration, so we can't assume it's there, but we also don't want to fail if not in case drivers can cope with it's absence - such as caif or rng. Add code to drivers to check presence of get callback and fail
2013 Dec 06
0
[PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
...c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c > index 9c5a1aa..5d1d04b 100644 > --- a/net/9p/trans_virtio.c > +++ b/net/9p/trans_virtio.c > @@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, > int count = nr_pages; > while (nr_pages) { > s = rest_of_page(data); > - pages[index++] = kmap_to_page(data); > + if (is_vmalloc_or_module_addr(data)) Can this really end up being a module address? Will
2015 Mar 12
0
[PATCH] 9p/trans_virtio: fix hot-unplug
..._virtio.c > index d8e376a..d1b2f306 100644 > --- a/net/9p/trans_virtio.c > +++ b/net/9p/trans_virtio.c > @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) > static void p9_virtio_remove(struct virtio_device *vdev) > { > struct virtio_chan *chan = vdev->priv; > - > - if (chan->inuse) > - p9_virtio_close(chan->client); > - vdev->config->del_vqs(vdev); > + unsigned long warning_time; > + bool inuse; > > mutex_lock(&virtio_9p_lock); > + > + /* Remove self from list so we don't ge...
2015 Mar 12
0
[PATCH] 9p/trans_virtio: fix hot-unplug
..._virtio.c > index d8e376a..d1b2f306 100644 > --- a/net/9p/trans_virtio.c > +++ b/net/9p/trans_virtio.c > @@ -658,14 +658,31 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) > static void p9_virtio_remove(struct virtio_device *vdev) > { > struct virtio_chan *chan = vdev->priv; > - > - if (chan->inuse) > - p9_virtio_close(chan->client); > - vdev->config->del_vqs(vdev); > + unsigned long warning_time; > + bool inuse; > > mutex_lock(&virtio_9p_lock); > + > + /* Remove self from list so we don't ge...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...gfp_t gfp); diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index fd05c81..7c5ac34 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -259,6 +259,7 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req) int in, out; unsigned long flags; struct virtio_chan *chan = client->trans; + struct scatterlist *outsg = NULL, *insg = NULL; p9_debug(P9_DEBUG_TRANS, "9p debug: virtio request\n"); @@ -269,12 +270,21 @@ req_retry: /* Handle out VirtIO ring buffers */ out = pack_sg_list(chan->sg, 0, VIRTQUEUE_NUM, req->tc->sdata...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...gfp_t gfp); diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index fd05c81..7c5ac34 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -259,6 +259,7 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req) int in, out; unsigned long flags; struct virtio_chan *chan = client->trans; + struct scatterlist *outsg = NULL, *insg = NULL; p9_debug(P9_DEBUG_TRANS, "9p debug: virtio request\n"); @@ -269,12 +270,21 @@ req_retry: /* Handle out VirtIO ring buffers */ out = pack_sg_list(chan->sg, 0, VIRTQUEUE_NUM, req->tc->sdata...
2009 May 12
0
[PATCHv4] virtio: find_vqs/del_vqs virtio operations
...void (*finalize_features)(struct virtio_device *vdev); }; diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index ab8791f..c5ce024 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -230,6 +230,8 @@ static int p9_virtio_probe(struct virtio_device *vdev) int err; struct virtio_chan *chan; int index; + vq_callback_t *callbacks[] = { req_done }; + const char *names[] = { "requests" }; mutex_lock(&virtio_9p_lock); index = chan_index++; @@ -246,11 +248,9 @@ static int p9_virtio_probe(struct virtio_device *vdev) chan->vdev = vdev; /* We expect one vi...