search for: virtio_pmem_req

Displaying 20 results from an estimated 28 matches for "virtio_pmem_req".

Did you mean: virtio_mem_req
2019 Jul 10
2
[PATCH] virtio_pmem: fix sparse warning
...h index efcd72f2d20d..f89129bf1f84 100644 --- a/include/uapi/linux/virtio_pmem.h +++ b/include/uapi/linux/virtio_pmem.h @@ -23,12 +23,12 @@ struct virtio_pmem_config { struct virtio_pmem_resp { /* Host return status corresponding to flush request */ - __u32 ret; + __virtio32 ret; }; struct virtio_pmem_req { /* command type */ - __u32 type; + __virtio32 type; }; #endif -- 2.20.1
2019 Jul 10
2
[PATCH] virtio_pmem: fix sparse warning
...h index efcd72f2d20d..f89129bf1f84 100644 --- a/include/uapi/linux/virtio_pmem.h +++ b/include/uapi/linux/virtio_pmem.h @@ -23,12 +23,12 @@ struct virtio_pmem_config { struct virtio_pmem_resp { /* Host return status corresponding to flush request */ - __u32 ret; + __virtio32 ret; }; struct virtio_pmem_req { /* command type */ - __u32 type; + __virtio32 type; }; #endif -- 2.20.1
2019 Jul 10
2
[PATCH v2] virtio_pmem: fix sparse warning
...; +#include <linux/virtio_types.h> #include <linux/virtio_ids.h> #include <linux/virtio_config.h> @@ -23,12 +23,12 @@ struct virtio_pmem_config { struct virtio_pmem_resp { /* Host return status corresponding to flush request */ - __u32 ret; + __virtio32 ret; }; struct virtio_pmem_req { /* command type */ - __u32 type; + __virtio32 type; }; #endif -- 2.20.1
2019 Jul 10
2
[PATCH v2] virtio_pmem: fix sparse warning
...; +#include <linux/virtio_types.h> #include <linux/virtio_ids.h> #include <linux/virtio_config.h> @@ -23,12 +23,12 @@ struct virtio_pmem_config { struct virtio_pmem_resp { /* Host return status corresponding to flush request */ - __u32 ret; + __virtio32 ret; }; struct virtio_pmem_req { /* command type */ - __u32 type; + __virtio32 type; }; #endif -- 2.20.1
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...INUX_VIRTIO_PMEM_H > + > +#include <linux/virtio_ids.h> > +#include <linux/module.h> > +#include <linux/virtio_config.h> > +#include <uapi/linux/virtio_pmem.h> > +#include <linux/libnvdimm.h> > +#include <linux/spinlock.h> > + > +struct virtio_pmem_request { > + /* Host return status corresponding to flush request */ > + int ret; > + > + /* command name*/ > + char name[16]; So ... why are we sending string commands and expect native-endianess integers and don't define a proper request/response structure + request types in incl...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...INUX_VIRTIO_PMEM_H > + > +#include <linux/virtio_ids.h> > +#include <linux/module.h> > +#include <linux/virtio_config.h> > +#include <uapi/linux/virtio_pmem.h> > +#include <linux/libnvdimm.h> > +#include <linux/spinlock.h> > + > +struct virtio_pmem_request { > + /* Host return status corresponding to flush request */ > + int ret; > + > + /* command name*/ > + char name[16]; So ... why are we sending string commands and expect native-endianess integers and don't define a proper request/response structure + request types in incl...
2019 May 21
1
[PATCH v10 2/7] virtio-pmem: Add virtio pmem driver
...linux/virtio_types.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +struct virtio_pmem_config { > + __le64 start; > + __le64 size; > +}; > + config generally should be __u64. Are you sure sparse does not complain? > +#define VIRTIO_PMEM_REQ_TYPE_FLUSH 0 > + > +struct virtio_pmem_resp { > + /* Host return status corresponding to flush request */ > + __virtio32 ret; > +}; > + > +struct virtio_pmem_req { > + /* command type */ > + __virtio32 type; > +}; > + > +#endif > -- > 2.20.1 Sorry wh...
2019 Jul 12
2
[PATCH v3] virtio_pmem: fix sparse warning
...++ b/drivers/nvdimm/nd_virtio.c @@ -53,7 +53,7 @@ static int virtio_pmem_flush(struct nd_region *nd_region) init_waitqueue_head(&req_data->host_acked); init_waitqueue_head(&req_data->wq_buf); INIT_LIST_HEAD(&req_data->list); - req_data->req.type = cpu_to_virtio32(vdev, VIRTIO_PMEM_REQ_TYPE_FLUSH); + req_data->req.type = cpu_to_le32(VIRTIO_PMEM_REQ_TYPE_FLUSH); sg_init_one(&sg, &req_data->req, sizeof(req_data->req)); sgs[0] = &sg; sg_init_one(&ret, &req_data->resp.ret, sizeof(req_data->resp)); @@ -90,7 +90,7 @@ static int virtio_pmem_flush...
2019 Jul 12
2
[PATCH v3] virtio_pmem: fix sparse warning
...++ b/drivers/nvdimm/nd_virtio.c @@ -53,7 +53,7 @@ static int virtio_pmem_flush(struct nd_region *nd_region) init_waitqueue_head(&req_data->host_acked); init_waitqueue_head(&req_data->wq_buf); INIT_LIST_HEAD(&req_data->list); - req_data->req.type = cpu_to_virtio32(vdev, VIRTIO_PMEM_REQ_TYPE_FLUSH); + req_data->req.type = cpu_to_le32(VIRTIO_PMEM_REQ_TYPE_FLUSH); sg_init_one(&sg, &req_data->req, sizeof(req_data->req)); sgs[0] = &sg; sg_init_one(&ret, &req_data->resp.ret, sizeof(req_data->resp)); @@ -90,7 +90,7 @@ static int virtio_pmem_flush...
2019 May 21
0
[PATCH v10 2/7] virtio-pmem: Add virtio pmem driver
...sistent memory range information + * from host and provides a virtio based flushing + * interface. + */ +#include "virtio_pmem.h" +#include "nd.h" + + /* The interrupt handler */ +void host_ack(struct virtqueue *vq) +{ + struct virtio_pmem *vpmem = vq->vdev->priv; + struct virtio_pmem_request *req_data, *req_buf; + unsigned long flags; + unsigned int len; + + spin_lock_irqsave(&vpmem->pmem_lock, flags); + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { + req_data->done = true; + wake_up(&req_data->host_acked); + + if (!list_empty(&vpmem->req...
2019 Jun 11
0
[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver
...sistent memory range information + * from host and provides a virtio based flushing + * interface. + */ +#include "virtio_pmem.h" +#include "nd.h" + + /* The interrupt handler */ +void host_ack(struct virtqueue *vq) +{ + struct virtio_pmem *vpmem = vq->vdev->priv; + struct virtio_pmem_request *req_data, *req_buf; + unsigned long flags; + unsigned int len; + + spin_lock_irqsave(&vpmem->pmem_lock, flags); + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { + req_data->done = true; + wake_up(&req_data->host_acked); + + if (!list_empty(&vpmem->req...
2019 Jun 12
0
[PATCH v13 2/7] virtio-pmem: Add virtio pmem driver
...ry range information + * from host and provides a virtio based flushing + * interface. + */ +#include "virtio_pmem.h" +#include "nd.h" + + /* The interrupt handler */ +void virtio_pmem_host_ack(struct virtqueue *vq) +{ + struct virtio_pmem *vpmem = vq->vdev->priv; + struct virtio_pmem_request *req_data, *req_buf; + unsigned long flags; + unsigned int len; + + spin_lock_irqsave(&vpmem->pmem_lock, flags); + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { + req_data->done = true; + wake_up(&req_data->host_acked); + + if (!list_empty(&vpmem->req...
2019 Jul 11
0
[PATCH] virtio_pmem: fix sparse warning
...clude/uapi/linux/virtio_pmem.h > +++ b/include/uapi/linux/virtio_pmem.h > @@ -23,12 +23,12 @@ struct virtio_pmem_config { > > struct virtio_pmem_resp { > /* Host return status corresponding to flush request */ > - __u32 ret; > + __virtio32 ret; > }; > > struct virtio_pmem_req { > /* command type */ > - __u32 type; > + __virtio32 type; > }; > > #endif req/resp are in memory right? Then this looks like a wrong fix. The accessors should all use cpu_to/from_le and they types should be __le32. > -- > 2.20.1
2019 Jul 11
0
[PATCH v2] virtio_pmem: fix sparse warning
...linux/virtio_ids.h> > #include <linux/virtio_config.h> > > @@ -23,12 +23,12 @@ struct virtio_pmem_config { > > struct virtio_pmem_resp { > /* Host return status corresponding to flush request */ > - __u32 ret; > + __virtio32 ret; > }; > > struct virtio_pmem_req { > /* command type */ > - __u32 type; > + __virtio32 type; > }; > > #endif Same comment as previously: pls use __le and fix accessors. > -- > 2.20.1
2019 Jul 12
0
[PATCH v3] virtio_pmem: fix sparse warning
...rtio.c > @@ -53,7 +53,7 @@ static int virtio_pmem_flush(struct nd_region *nd_region) > init_waitqueue_head(&req_data->host_acked); > init_waitqueue_head(&req_data->wq_buf); > INIT_LIST_HEAD(&req_data->list); > - req_data->req.type = cpu_to_virtio32(vdev, VIRTIO_PMEM_REQ_TYPE_FLUSH); > + req_data->req.type = cpu_to_le32(VIRTIO_PMEM_REQ_TYPE_FLUSH); > sg_init_one(&sg, &req_data->req, sizeof(req_data->req)); > sgs[0] = &sg; > sg_init_one(&ret, &req_data->resp.ret, sizeof(req_data->resp)); > @@ -90,7 +90,7 @@ sta...
2019 May 15
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...t; +#include <linux/virtio_ids.h> >> +#include <linux/module.h> >> +#include <linux/virtio_config.h> >> +#include <uapi/linux/virtio_pmem.h> >> +#include <linux/libnvdimm.h> >> +#include <linux/spinlock.h> >> + >> +struct virtio_pmem_request { >> + /* Host return status corresponding to flush request */ >> + int ret; >> + >> + /* command name*/ >> + char name[16]; > > So ... why are we sending string commands and expect native-endianess > integers and don't define a proper request/respons...
2019 May 16
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...clude <linux/virtio_ids.h> > > +#include <linux/module.h> > > +#include <linux/virtio_config.h> > > +#include <uapi/linux/virtio_pmem.h> > > +#include <linux/libnvdimm.h> > > +#include <linux/spinlock.h> > > + > > +struct virtio_pmem_request { > > + /* Host return status corresponding to flush request */ > > + int ret; > > + > > + /* command name*/ > > + char name[16]; > > So ... why are we sending string commands and expect native-endianess > integers and don't define a proper request/re...
2019 May 21
9
[PATCH v10 0/7] virtio pmem driver
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 & VIRTIO patches. Need an ack on device mapper change in patch 4. Mike, Can you please review patch 4 which has change for dax with device mapper. Incorporated all the changes suggested in v9. This version has minor changes in patch 2(virtio) and does not change the
2019 Jun 10
8
[PATCH v11 0/7] virtio pmem driver
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 & VIRTIO patches. Need an ack on device mapper change in patch 4. Mike, Can you please review and ack patch4. This version does not has any additonal code change from v10 and is only rebase of v10 on Linux 5.2-rc4 which is required for patch4. Keeping all the existing
2019 Jun 21
7
[PATCH v14 0/7] virtio pmem driver
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 device mapper & VIRTIO patches. This version has fix for test bot build failure. Keeping all the existing r-o-bs. Jakob CCed also tested the patch series and confirmed the working of v9. --- This patch series has implementation for "virtio pmem". "virtio