search for: vdpasim_is_little_endian

Displaying 14 results from an estimated 14 matches for "vdpasim_is_little_endian".

2020 Jul 15
2
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
...lt;linux/vdpa.h> +#include <linux/virtio_byteorder.h> #include <linux/vhost_iotlb.h> #include <uapi/linux/virtio_config.h> #include <uapi/linux/virtio_net.h> @@ -72,6 +73,23 @@ struct vdpasim { u64 features; }; +/* TODO: cross-endian support */ +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) +{ + return virtio_legacy_is_little_endian() || + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); +} + +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) +{ + return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); +} +...
2020 Jul 15
2
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
...lt;linux/vdpa.h> +#include <linux/virtio_byteorder.h> #include <linux/vhost_iotlb.h> #include <uapi/linux/virtio_config.h> #include <uapi/linux/virtio_net.h> @@ -72,6 +73,23 @@ struct vdpasim { u64 features; }; +/* TODO: cross-endian support */ +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) +{ + return virtio_legacy_is_little_endian() || + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); +} + +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) +{ + return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); +} +...
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...order.h> > #include <linux/vhost_iotlb.h> > #include <uapi/linux/virtio_config.h> > #include <uapi/linux/virtio_net.h> > @@ -72,6 +73,23 @@ struct vdpasim { > u64 features; > }; > > +/* TODO: cross-endian support */ > +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) > +{ > + return virtio_legacy_is_little_endian() || > + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); > +} > + > +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) > +{ > + return __virtio16_to_cpu(vdpasi...
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...order.h> > #include <linux/vhost_iotlb.h> > #include <uapi/linux/virtio_config.h> > #include <uapi/linux/virtio_net.h> > @@ -72,6 +73,23 @@ struct vdpasim { > u64 features; > }; > > +/* TODO: cross-endian support */ > +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) > +{ > + return virtio_legacy_is_little_endian() || > + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); > +} > + > +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) > +{ > + return __virtio16_to_cpu(vdpasi...
2020 Jul 16
1
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
...<linux/vhost_iotlb.h> > > #include <uapi/linux/virtio_config.h> > > #include <uapi/linux/virtio_net.h> > > @@ -72,6 +73,23 @@ struct vdpasim { > > u64 features; > > }; > > +/* TODO: cross-endian support */ > > +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) > > +{ > > + return virtio_legacy_is_little_endian() || > > + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); > > +} > > + > > +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) > > +{ &gt...
2020 Jul 15
0
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
...order.h> > #include <linux/vhost_iotlb.h> > #include <uapi/linux/virtio_config.h> > #include <uapi/linux/virtio_net.h> > @@ -72,6 +73,23 @@ struct vdpasim { > u64 features; > }; > > +/* TODO: cross-endian support */ > +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) > +{ > + return virtio_legacy_is_little_endian() || > + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); > +} > + > +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) > +{ > + return __virtio16_to_cpu(vdpasi...
2020 Aug 03
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...lt;linux/vdpa.h> +#include <linux/virtio_byteorder.h> #include <linux/vhost_iotlb.h> #include <uapi/linux/virtio_config.h> #include <uapi/linux/virtio_net.h> @@ -72,6 +73,23 @@ struct vdpasim { u64 features; }; +/* TODO: cross-endian support */ +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) +{ + return virtio_legacy_is_little_endian() || + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); +} + +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) +{ + return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); +} +...
2020 Aug 05
0
[PATCH v3 22/38] vdpa_sim: fix endian-ness of config space
...lt;linux/vdpa.h> +#include <linux/virtio_byteorder.h> #include <linux/vhost_iotlb.h> #include <uapi/linux/virtio_config.h> #include <uapi/linux/virtio_net.h> @@ -72,6 +73,23 @@ struct vdpasim { u64 features; }; +/* TODO: cross-endian support */ +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) +{ + return virtio_legacy_is_little_endian() || + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); +} + +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) +{ + return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); +} +...
2020 Aug 05
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...<linux/vhost_iotlb.h> > > #include <uapi/linux/virtio_config.h> > > #include <uapi/linux/virtio_net.h> > > @@ -72,6 +73,23 @@ struct vdpasim { > > u64 features; > > }; > > +/* TODO: cross-endian support */ > > +static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) > > +{ > > + return virtio_legacy_is_little_endian() || > > + (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); > > +} > > + > > +static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) > > +{ &gt...
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).
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
...)(struct vdpasim *vdpasim, u16 idx, @@ -78,6 +78,7 @@ struct vdpasim { struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *attr, const struct vdpa_dev_set_config *config); +void vdpasim_schedule_work(struct vdpasim *vdpasim); /* TODO: cross-endian support */ static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 47cdf2a1f5b8..f6329900e61a 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -127,6 +127,13 @@ static void vdpasim_do_reset(struct vdpasim *vdpasim)...
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the