Displaying 20 results from an estimated 27 matches for "vhost_rpmsg_iter_len".
2020 May 16
0
[PATCH RFC] vhost: add an SOF Audio DSP driver
...p_data_read(struct vhost_rpmsg *vr,
+ struct vhost_rpmsg_iter *iter)
+{
+ struct vhost_dsp *dsp = container_of(vr, struct vhost_dsp, vrdev);
+ struct vhost_virtqueue *vq = iter->vq;
+ struct sof_rpmsg_data_resp *resp = &dsp->data_resp;
+ struct sof_rpmsg_data_req req;
+ size_t len = vhost_rpmsg_iter_len(iter);
+ size_t nbytes;
+
+ if (len < sizeof(req)) {
+ vq_err(vq, "%s(): data count %zu too small\n",
+ __func__, len);
+ return -EINVAL;
+ }
+
+ /* copy_{to,from}_iter() can be called repeatedly to continue copying */
+ nbytes = vhost_rpmsg_copy(vr, iter, &req, sizeof(re...
2020 May 25
0
[Sound-open-firmware] [PATCH RFC] vhost: add an SOF Audio DSP driver
...; > +static ssize_t vhost_dsp_ipc_write(struct vhost_rpmsg *vr,
> > + struct vhost_rpmsg_iter *iter)
> > +{
> > + struct vhost_dsp *dsp = container_of(vr, struct vhost_dsp, vrdev);
> > +
> > + return vhost_rpmsg_copy(vr, iter, dsp->reply_buf,
> > + vhost_rpmsg_iter_len(iter)) ==
> > + vhost_rpmsg_iter_len(iter) ? 0 : -EIO;
> > +}
>
> This is rather convoluted code, with the same function called on both sides
> of a comparison.
It's a simple inline function, but sure, I can add a variable to cache its
result in it.
> > +
> >...
2020 May 27
0
[PATCH v2 5/5] vhost: add an RPMsg API
...> > +};
> > +
> > +struct vhost_rpmsg_ept {
> > + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + int addr;
> > +};
> > +
> > +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> > +{
> > + return iter->rhdr.len;
> > +}
> > +
> > +#define VHOST_RPMSG_ITER(_src, _dst) { \
> > + .rhdr = { \
> > + .src = _src, \
> > + .dst = _dst, \
> > + }, \
> > + }
> > +
>...
2020 Sep 11
0
[PATCH v5 4/4] vhost: add an RPMsg API
...{
> > > > + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > > > + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > > > + int addr;
> > > > +};
> > > > +
> > > > +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> > > > +{
> > > > + return iter->rhdr.len;
> > > > +}
> > >
> > > Again, I don't see where this is used.
> >
> > This is exported API, it's used by users.
> >
> > > &g...
2020 May 25
6
[PATCH v2 0/5] Add a vhost RPMsg API
v2:
- remove "default n" from Kconfig
- drop patch #6 - it depends on a different patch, that is currently
an RFC
- update patch #5 with a correct vhost_dev_init() prototype
Linux supports RPMsg over VirtIO for "remote processor" /AMP use
cases. It can however also be used for virtualisation scenarios,
e.g. when using KVM to run Linux on both the host and the guests.
This
2020 Sep 10
0
[PATCH v7 3/3] vhost: add an RPMsg API
...vq_p[VIRTIO_RPMSG_NUM_OF_VQS];
+ const struct vhost_rpmsg_ept *ept;
+ unsigned int n_epts;
+};
+
+struct vhost_rpmsg_ept {
+ ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ int addr;
+};
+
+static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
+{
+ return iter->rhdr.len;
+}
+
+#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
+ .rhdr = { \
+ .src = cpu_to_vhost32(_vq, _src), \
+ .dst = cpu_to_vhost32(_vq, _dst), \
+ }, \
+ }
+
+void vhost_rpmsg_init(struct vhost_rpmsg *vr, const struct...
2020 May 27
0
[PATCH v3 5/5] vhost: add an RPMsg API
...vq_p[VIRTIO_RPMSG_NUM_OF_VQS];
+ const struct vhost_rpmsg_ept *ept;
+ unsigned int n_epts;
+};
+
+struct vhost_rpmsg_ept {
+ ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ int addr;
+};
+
+static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
+{
+ return iter->rhdr.len;
+}
+
+#define VHOST_RPMSG_ITER(_src, _dst) { \
+ .rhdr = { \
+ .src = _src, \
+ .dst = _dst, \
+ }, \
+ }
+
+void vhost_rpmsg_init(struct vhost_rpmsg *vr, const struct vhost_rpmsg_ept *ept,
+ unsigned int n_epts);
+...
2020 Jul 22
0
[PATCH v4 4/4] vhost: add an RPMsg API
...vq_p[VIRTIO_RPMSG_NUM_OF_VQS];
+ const struct vhost_rpmsg_ept *ept;
+ unsigned int n_epts;
+};
+
+struct vhost_rpmsg_ept {
+ ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
+ int addr;
+};
+
+static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
+{
+ return iter->rhdr.len;
+}
+
+#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
+ .rhdr = { \
+ .src = cpu_to_vhost32(_vq, _src), \
+ .dst = cpu_to_vhost32(_vq, _dst), \
+ }, \
+ }
+
+void vhost_rpmsg_init(struct vhost_rpmsg *vr, const struct...
2020 Aug 26
12
[PATCH v5 0/4] Add a vhost RPMsg API
Hi,
Next update:
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
- update patch #5 with a correct vhost_dev_init() prototype
- drop patch #6 - it depends on a different patch, that is currently
an RFC
- address comments from Pierre-Louis Bossart:
2020 Aug 26
12
[PATCH v5 0/4] Add a vhost RPMsg API
Hi,
Next update:
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
- update patch #5 with a correct vhost_dev_init() prototype
- drop patch #6 - it depends on a different patch, that is currently
an RFC
- address comments from Pierre-Louis Bossart:
2020 Sep 15
0
[PATCH v5 4/4] vhost: add an RPMsg API
...ost_rpmsg *, struct vhost_rpmsg_iter *);
> > > > > > + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > > > > > + int addr;
> > > > > > +};
> > > > > > +
> > > > > > +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> > > > > > +{
> > > > > > + return iter->rhdr.len;
> > > > > > +}
> > > > >
> > > > > Again, I don't see where this is used.
> > > >
> > > > Thi...
2020 May 29
15
[RFC 00/12] Audio DSP VirtIO and vhost drivers
This patch set is a follow up to "Add a vhost RPMsg API" [1], it is
marked as an RFC because firstly it depends on the RPMsg API series
and secondly it is currently being reviewed on ALSA and SOF mailing
lists, but any early comments from virtualisation developers would be
highly appreciated too!
Thanks
Guennadi
[1]
2020 May 29
15
[RFC 00/12] Audio DSP VirtIO and vhost drivers
This patch set is a follow up to "Add a vhost RPMsg API" [1], it is
marked as an RFC because firstly it depends on the RPMsg API series
and secondly it is currently being reviewed on ALSA and SOF mailing
lists, but any early comments from virtualisation developers would be
highly appreciated too!
Thanks
Guennadi
[1]
2020 Sep 10
0
[PATCH v5 4/4] vhost: add an RPMsg API
...> > +};
> > +
> > +struct vhost_rpmsg_ept {
> > + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + int addr;
> > +};
> > +
> > +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> > +{
> > + return iter->rhdr.len;
> > +}
>
> Again, I don't see where this is used.
This is exported API, it's used by users.
> > +
> > +#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
> > + .rhdr = {...
2020 Sep 18
0
[PATCH v7 3/3] vhost: add an RPMsg API
...> > +};
> > +
> > +struct vhost_rpmsg_ept {
> > + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> > + int addr;
> > +};
> > +
> > +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> > +{
> > + return iter->rhdr.len;
> > +}
> > +
> > +#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
> > + .rhdr = { \
> > + .src = cpu_to_vhost32(_vq, _src), \
> > + .dst = cpu_to_vhost32(_vq, _dst),...
2020 Sep 10
6
[PATCH v7 0/3] Add a vhost RPMsg API
Hi,
Next update:
v7:
- remove documentation update to be send separately
- address comments from Mathieu Poirier (thanks)
v6:
- rename include/linux/virtio_rpmsg.h -> include/linux/rpmsg/virtio.h
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
2020 Sep 10
6
[PATCH v7 0/3] Add a vhost RPMsg API
Hi,
Next update:
v7:
- remove documentation update to be send separately
- address comments from Mathieu Poirier (thanks)
v6:
- rename include/linux/virtio_rpmsg.h -> include/linux/rpmsg/virtio.h
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
2020 Aug 04
2
[PATCH v4 4/4] vhost: add an RPMsg API
...t_rpmsg_ept *ept;
> + unsigned int n_epts;
> +};
> +
> +struct vhost_rpmsg_ept {
> + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> + int addr;
> +};
> +
> +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> +{
> + return iter->rhdr.len;
> +}
> +
> +#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
> + .rhdr = { \
> + .src = cpu_to_vhost32(_vq, _src), \
> + .dst = cpu_to_vhost32(_vq, _dst), \
> + }, \
> + }
> +
>...
2020 Aug 04
2
[PATCH v4 4/4] vhost: add an RPMsg API
...t_rpmsg_ept *ept;
> + unsigned int n_epts;
> +};
> +
> +struct vhost_rpmsg_ept {
> + ssize_t (*read)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> + ssize_t (*write)(struct vhost_rpmsg *, struct vhost_rpmsg_iter *);
> + int addr;
> +};
> +
> +static inline size_t vhost_rpmsg_iter_len(const struct vhost_rpmsg_iter *iter)
> +{
> + return iter->rhdr.len;
> +}
> +
> +#define VHOST_RPMSG_ITER(_vq, _src, _dst) { \
> + .rhdr = { \
> + .src = cpu_to_vhost32(_vq, _src), \
> + .dst = cpu_to_vhost32(_vq, _dst), \
> + }, \
> + }
> +
>...
2020 Jul 22
13
[PATCH v4 0/4] Add a vhost RPMsg API
Hi,
Now that virtio-rpmsg endianness fixes have been merged we can
proceed with the next step.
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
- update patch #5 with a correct vhost_dev_init() prototype
- drop patch #6 - it depends on a different patch, that is currently
an RFC
-