Displaying 20 results from an estimated 63 matches for "virtio_cwrite64".
Did you mean:
virtio_cwrite
2016 Nov 27
2
[PATCH v2 1/2] virtio: introduce little edian functions for virtio_cread/write# family
...++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index 26c155b..de05707 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -414,4 +414,49 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
> _r; \
> })
>
> +static inline __le16 virtio_cread16_le(struct virtio_device *vdev,
> + unsigned int offset)
> +{
> + __le16 ret;
> +
> + vdev->config->get(vdev, offset, &ret, sizeof(ret));
> + return ret;
> +}...
2016 Nov 27
2
[PATCH v2 1/2] virtio: introduce little edian functions for virtio_cread/write# family
...++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index 26c155b..de05707 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -414,4 +414,49 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
> _r; \
> })
>
> +static inline __le16 virtio_cread16_le(struct virtio_device *vdev,
> + unsigned int offset)
> +{
> + __le16 ret;
> +
> + vdev->config->get(vdev, offset, &ret, sizeof(ret));
> + return ret;
> +}...
2016 Nov 28
3
[virtio-dev] Re: [PATCH v2 1/2] virtio: introduce little edian functions for virtio_cread/write# family
...t; >
> > > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> > > index 26c155b..de05707 100644
> > > --- a/include/linux/virtio_config.h
> > > +++ b/include/linux/virtio_config.h
> > > @@ -414,4 +414,49 @@ static inline void virtio_cwrite64(struct virtio_device
> > *vdev,
> > > _r; \
> > > })
> > >
> > > +static inline __le16 virtio_cread16_le(struct virtio_device *vdev,
> > > + unsigned int offset)
> > > +{
> > > + __le16 ret;
> > > +
> &g...
2016 Nov 28
3
[virtio-dev] Re: [PATCH v2 1/2] virtio: introduce little edian functions for virtio_cread/write# family
...t; >
> > > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> > > index 26c155b..de05707 100644
> > > --- a/include/linux/virtio_config.h
> > > +++ b/include/linux/virtio_config.h
> > > @@ -414,4 +414,49 @@ static inline void virtio_cwrite64(struct virtio_device
> > *vdev,
> > > _r; \
> > > })
> > >
> > > +static inline __le16 virtio_cread16_le(struct virtio_device *vdev,
> > > + unsigned int offset)
> > > +{
> > > + __le16 ret;
> > > +
> &g...
2020 Jul 07
3
[PATCH v4 1/2] virtio: let arch validate VIRTIO features
...v, VIRTIO_F_VERSION_1))
> return 0;
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index bb4cc4910750..3f4117adf311 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
> _r; \
> })
>
> +int arch_validate_virtio_features(struct virtio_device *dev);
> #endif /* _LINUX_VIRTIO_CONFIG_H */
With the wording fixed,
Reviewed-by: Cornelia Huck <cohuck at redhat.com>
2020 Jul 07
3
[PATCH v4 1/2] virtio: let arch validate VIRTIO features
...v, VIRTIO_F_VERSION_1))
> return 0;
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index bb4cc4910750..3f4117adf311 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
> _r; \
> })
>
> +int arch_validate_virtio_features(struct virtio_device *dev);
> #endif /* _LINUX_VIRTIO_CONFIG_H */
With the wording fixed,
Reviewed-by: Cornelia Huck <cohuck at redhat.com>
2020 Jul 09
4
[PATCH v5 0/2] s390: virtio: let arch validate VIRTIO features
Hi all,
The goal of the series is to give a chance to the architecture
to validate VIRTIO device features.
in this respin:
1) I kept removed the ack from Jason as I reworked the patch
@Jason, the nature and goal of the patch did not really changed
please can I get back your acked-by with these changes?
2) I suppressed the unnecessary verbosity of the architecture
specific
2020 Aug 18
4
[PATCH v8 0/2] s390: virtio: let arch validate VIRTIO features
Hi all,
The goal of the series is to give a chance to the architecture
to validate VIRTIO device features.
in this respin:
I use the original idea from Connie for an optional
arch_has_restricted_memory_access.
I renamed the callback accordingly, added the definition of
ARCH_HAS_RESTRICTED_MEMORY_ACCESS inside the VIRTIO Kconfig
and the selection in the PROTECTED_VIRTUALIZATION_GUEST
config
2020 Jul 07
5
[PATCH v4 0/2] s390: virtio: let arch validate VIRTIO features
Hi all,
I changed the patch subject to reflect the content, becoming more
general.
1) I removed the ack from Christian and Jason even far as
I understand they gave it for the functionality more than for the
implementation.
@Jason, @Christian, please can I get back your acked-by with these changes?
2) previous patch had another name:
[PATCH v3 0/1] s390: virtio: let arch choose to
2016 Nov 22
0
[PATCH v2 1/2] virtio: introduce little edian functions for virtio_cread/write# family
...45 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 26c155b..de05707 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -414,4 +414,49 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+static inline __le16 virtio_cread16_le(struct virtio_device *vdev,
+ unsigned int offset)
+{
+ __le16 ret;
+
+ vdev->config->get(vdev, offset, &ret, sizeof(ret));
+ return ret;
+}
+
+static inline void virtio_cwrite16_le(struct virtio...
2020 Jul 07
0
[PATCH v4 1/2] virtio: let arch validate VIRTIO features
...ret;
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bb4cc4910750..3f4117adf311 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+int arch_validate_virtio_features(struct virtio_device *dev);
#endif /* _LINUX_VIRTIO_CONFIG_H */
--
2.25.1
2020 Jul 09
0
[PATCH v5 1/2] virtio: let arch validate VIRTIO features
...ret;
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bb4cc4910750..3f4117adf311 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+int arch_validate_virtio_features(struct virtio_device *dev);
#endif /* _LINUX_VIRTIO_CONFIG_H */
--
2.25.1
2020 Jul 09
1
[PATCH v5 1/2] virtio: let arch validate VIRTIO features
...v, VIRTIO_F_VERSION_1))
> return 0;
>
> diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> index bb4cc4910750..3f4117adf311 100644
> --- a/include/linux/virtio_config.h
> +++ b/include/linux/virtio_config.h
> @@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
> _r; \
> })
>
> +int arch_validate_virtio_features(struct virtio_device *dev);
> #endif /* _LINUX_VIRTIO_CONFIG_H */
2020 Jul 15
0
[PATCH v7 1/2] virtio: let arch validate VIRTIO features
...ret;
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bb4cc4910750..3f4117adf311 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -459,4 +459,5 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+int arch_validate_virtio_features(struct virtio_device *dev);
#endif /* _LINUX_VIRTIO_CONFIG_H */
--
2.25.1
2020 Aug 05
0
[PATCH v3 23/38] virtio_config: cread/write cleanup
...ic inline u64 virtio_cread64(struct virtio_device *vdev,
unsigned int offset)
{
- u64 ret;
+ __virtio64 ret;
+
__virtio_cread_many(vdev, offset, &ret, 1, sizeof(ret));
- return virtio64_to_cpu(vdev, (__force __virtio64)ret);
+ return virtio64_to_cpu(vdev, ret);
}
static inline void virtio_cwrite64(struct virtio_device *vdev,
unsigned int offset, u64 val)
{
+ __virtio64 v;
+
might_sleep();
- val = (__force u64)cpu_to_virtio64(vdev, val);
- vdev->config->set(vdev, offset, &val, sizeof(val));
+ v = cpu_to_virtio64(vdev, val);
+ vdev->config->set(vdev, offset, &v,...
2020 Aug 05
0
[PATCH v3 28/38] virtio_config: add virtio_cread_le_feature
...linux/virtio_config.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 5b5196fec899..cc7a2b1fd7b2 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -555,4 +555,14 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+/* Conditional config space accessors. */
+#define virtio_cread_le_feature(vdev, fbit, structname, member, ptr) \
+ ({ \
+ int _r = 0; \
+ if (!virtio_has_feature(vdev, fbit)) \
+ _r = -ENOENT; \
+ else \
+ virtio_cre...
2020 Aug 18
0
[PATCH v8 1/2] virtio: let arch validate VIRTIO features
...et;
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bb4cc4910750..f6b82541c497 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -459,4 +459,13 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+#ifdef CONFIG_ARCH_HAS_RESTRICTED_MEMORY_ACCESS
+int arch_has_restricted_memory_access(struct virtio_device *dev);
+#else
+static inline int arch_has_restricted_memory_access(struct virtio_device *dev)
+{
+ return 0;
+}
+#endif /* CONFIG_ARCH_HAS_R...
2020 Aug 19
0
[PATCH v9 1/2] virtio: let arch advertise guest's memory access restrictions
...+ }
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bb4cc4910750..e380664642b4 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -459,4 +459,13 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
_r; \
})
+#ifdef CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
+int arch_has_restricted_virtio_memory_access(void);
+#else
+static inline int arch_has_restricted_virtio_memory_access(void)
+{
+ return 0;
+}
+#endif /* CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMO...
2020 Sep 07
0
[PATCH v11 1/2] virtio: let arch advertise guest's memory access restrictions
...+ }
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 8fe857e27ef3..3f697c8c8205 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -540,4 +540,14 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
virtio_cread_le((vdev), structname, member, ptr); \
_r; \
})
+
+#ifdef CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
+int arch_has_restricted_virtio_memory_access(void);
+#else
+static inline int arch_has_restricted_virtio_memory_access(void)
+{
+ return...
2020 Sep 10
0
[PATCH v12 1/2] virtio: let arch advertise guest's memory access restrictions
...+ }
+
if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1))
return 0;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 8fe857e27ef3..3f697c8c8205 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -540,4 +540,14 @@ static inline void virtio_cwrite64(struct virtio_device *vdev,
virtio_cread_le((vdev), structname, member, ptr); \
_r; \
})
+
+#ifdef CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
+int arch_has_restricted_virtio_memory_access(void);
+#else
+static inline int arch_has_restricted_virtio_memory_access(void)
+{
+ return...