Displaying 10 results from an estimated 10 matches for "vdpa_get_config".
2020 Jul 28
0
[vhost:vhost 38/45] include/linux/vdpa.h:43:21: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
...| ^~
include/linux/vdpa.h: In function 'vdpa_set_features':
include/linux/vdpa.h:284:6: error: 'struct vdpa_device' has no member named 'features_valid'
284 | vdev->features_valid = true;
| ^~
include/linux/vdpa.h: In function 'vdpa_get_config':
include/linux/vdpa.h:298:11: error: 'struct vdpa_device' has no member named 'features_valid'
298 | if (!vdev->features_valid)
| ^~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,...
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...tic inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = true;
> + return ops->set_features(vdev, features);
> +}
> +
> +
> +static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
> + void *buf, unsigned int len)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + /*
> + * Config accesses aren't supposed to trigger before features are set.
> + * If it does happen we assume a...
2020 Aug 05
2
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...tic inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + vdev->features_valid = true;
> + return ops->set_features(vdev, features);
> +}
> +
> +
> +static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
> + void *buf, unsigned int len)
> +{
> + const struct vdpa_config_ops *ops = vdev->config;
> +
> + /*
> + * Config accesses aren't supposed to trigger before features are set.
> + * If it does happen we assume a...
2020 Aug 03
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...ops->set_status(vdev, 0);
+}
+
+static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = true;
+ return ops->set_features(vdev, features);
+}
+
+
+static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
+ void *buf, unsigned int len)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ /*
+ * Config accesses aren't supposed to trigger before features are set.
+ * If it does happen we assume a legacy guest.
+ */
+ if (!vdev->...
2020 Aug 05
0
[PATCH v3 19/38] vdpa: make sure set_features is invoked for legacy
...ops->set_status(vdev, 0);
+}
+
+static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ vdev->features_valid = true;
+ return ops->set_features(vdev, features);
+}
+
+
+static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
+ void *buf, unsigned int len)
+{
+ const struct vdpa_config_ops *ops = vdev->config;
+
+ /*
+ * Config accesses aren't supposed to trigger before features are set.
+ * If it does happen we assume a legacy guest.
+ */
+ if (!vdev->...
2020 Aug 05
0
[PATCH v3 20/38] vhost/vdpa: switch to new helpers
...reset(struct vhost_vdpa *v)
{
struct vdpa_device *vdpa = v->vdpa;
- const struct vdpa_config_ops *ops = vdpa->config;
- ops->set_status(vdpa, 0);
+ vdpa_reset(vdpa);
}
static long vhost_vdpa_get_device_id(struct vhost_vdpa *v, u8 __user *argp)
@@ -196,7 +195,6 @@ static long vhost_vdpa_get_config(struct vhost_vdpa *v,
struct vhost_vdpa_config __user *c)
{
struct vdpa_device *vdpa = v->vdpa;
- const struct vdpa_config_ops *ops = vdpa->config;
struct vhost_vdpa_config config;
unsigned long size = offsetof(struct vhost_vdpa_config, buf);
u8 *buf;
@@ -209,7 +207,7 @@ stati...
2020 Aug 05
0
[PATCH v3 21/38] virtio_vdpa: legacy features handling
...irtio/virtio_vdpa.c
@@ -57,9 +57,8 @@ static void virtio_vdpa_get(struct virtio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct vdpa_device *vdpa = vd_get_vdpa(vdev);
- const struct vdpa_config_ops *ops = vdpa->config;
- ops->get_config(vdpa, offset, buf, len);
+ vdpa_get_config(vdpa, offset, buf, len);
}
static void virtio_vdpa_set(struct virtio_device *vdev, unsigned offset,
@@ -101,9 +100,8 @@ static void virtio_vdpa_set_status(struct virtio_device *vdev, u8 status)
static void virtio_vdpa_reset(struct virtio_device *vdev)
{
struct vdpa_device *vdpa = vd_get_vdp...
2020 Aug 05
0
[PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy
...device *vdev, u64 features)
> > +{
> > + const struct vdpa_config_ops *ops = vdev->config;
> > +
> > + vdev->features_valid = true;
> > + return ops->set_features(vdev, features);
> > +}
> > +
> > +
> > +static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
> > + void *buf, unsigned int len)
> > +{
> > + const struct vdpa_config_ops *ops = vdev->config;
> > +
> > + /*
> > + * Config accesses aren't supposed to trigger before features are set.
> >...
2020 Jul 28
0
[vhost:vhost 40/45] drivers/virtio/virtio_vdpa.c:301:9: error: void value not ignored as it ought to be
...| ^~
include/linux/vdpa.h: In function 'vdpa_set_features':
include/linux/vdpa.h:284:6: error: 'struct vdpa_device' has no member named 'features_valid'
284 | vdev->features_valid = true;
| ^~
include/linux/vdpa.h: In function 'vdpa_get_config':
include/linux/vdpa.h:298:11: error: 'struct vdpa_device' has no member named 'features_valid'
298 | if (!vdev->features_valid)
| ^~
drivers/virtio/virtio_vdpa.c: In function 'virtio_vdpa_get':
drivers/virtio/virtio_vdpa.c:60:32: war...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).