search for: acked_features

Displaying 20 results from an estimated 239 matches for "acked_features".

2014 Nov 30
2
[PATCH v7 28/46] vhost: make features 64 bit
...ons(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..c624b09 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,7 +106,7 @@ struct vhost_virtqueue { /* Protected by virtqueue mutex. */ struct vhost_memory *memory; void *private_data; - unsigned acked_features; + u64 acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -174,6 +174,6 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features &amp...
2014 Nov 30
2
[PATCH v7 28/46] vhost: make features 64 bit
...ons(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..c624b09 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,7 +106,7 @@ struct vhost_virtqueue { /* Protected by virtqueue mutex. */ struct vhost_memory *memory; void *private_data; - unsigned acked_features; + u64 acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -174,6 +174,6 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features &amp...
2011 Jan 18
2
[PATCH] vhost: rcu annotation fixup
...- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2af44b7..2d03a31 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -173,9 +173,7 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit) { unsigned acked_features; - acked_features = - rcu_dereference_index_check(dev->acked_features, - lockdep_is_held(&dev->mutex)); + acked_features = rcu_dereference_index_check(dev->acked_features, 1); return acked_features & (1 << bit); } -- 1.7.3.2.91.g446ac
2011 Jan 18
2
[PATCH] vhost: rcu annotation fixup
...- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2af44b7..2d03a31 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -173,9 +173,7 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit) { unsigned acked_features; - acked_features = - rcu_dereference_index_check(dev->acked_features, - lockdep_is_held(&dev->mutex)); + acked_features = rcu_dereference_index_check(dev->acked_features, 1); return acked_features & (1 << bit); } -- 1.7.3.2.91.g446ac
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...include <linux/if_tun.h> #include <netpacket/packet.h> #include <net/ethernet.h> #include <net/if.h> @@ -38,15 +39,6 @@ unsigned vhost_net_get_features(struct v return features; } -void vhost_net_ack_features(struct vhost_net *net, unsigned features) -{ - net->dev.acked_features = net->dev.backend_features; - if (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) - net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); - if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) - net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...include <linux/if_tun.h> #include <netpacket/packet.h> #include <net/ethernet.h> #include <net/if.h> @@ -38,15 +39,6 @@ unsigned vhost_net_get_features(struct v return features; } -void vhost_net_ack_features(struct vhost_net *net, unsigned features) -{ - net->dev.acked_features = net->dev.backend_features; - if (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) - net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); - if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) - net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC...
2014 Dec 01
1
[PATCH v7 28/46] vhost: make features 64 bit
...3eda654..c624b09 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -106,7 +106,7 @@ struct vhost_virtqueue { > > /* Protected by virtqueue mutex. */ > > struct vhost_memory *memory; > > void *private_data; > > - unsigned acked_features; > > + u64 acked_features; > > /* Log write descriptors */ > > void __user *log_base; > > struct vhost_log *log; > > @@ -174,6 +174,6 @@ enum { > > > > static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > { > &g...
2014 Dec 01
1
[PATCH v7 28/46] vhost: make features 64 bit
...3eda654..c624b09 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -106,7 +106,7 @@ struct vhost_virtqueue { > > /* Protected by virtqueue mutex. */ > > struct vhost_memory *memory; > > void *private_data; > > - unsigned acked_features; > > + u64 acked_features; > > /* Log write descriptors */ > > void __user *log_base; > > struct vhost_log *log; > > @@ -174,6 +174,6 @@ enum { > > > > static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > { > &g...
2014 Jun 05
2
[PATCH 1/2] vhost: move acked_features to VQs
...s(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 35eeb2a..ff454a0 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -105,6 +105,7 @@ struct vhost_virtqueue { struct vring_used_elem *heads; /* Protected by virtqueue mutex. */ void *private_data; + unsigned acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -117,7 +118,6 @@ struct vhost_dev { struct vhost_memory __rcu *memory; struct mm_struct *mm; struct mutex mutex; - unsigned acked_features; struct vhost_virtqueue **vqs; int nvqs; struct file *log_file;...
2014 Jun 05
2
[PATCH 1/2] vhost: move acked_features to VQs
...s(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 35eeb2a..ff454a0 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -105,6 +105,7 @@ struct vhost_virtqueue { struct vring_used_elem *heads; /* Protected by virtqueue mutex. */ void *private_data; + unsigned acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -117,7 +118,6 @@ struct vhost_dev { struct vhost_memory __rcu *memory; struct mm_struct *mm; struct mutex mutex; - unsigned acked_features; struct vhost_virtqueue **vqs; int nvqs; struct file *log_file;...
2014 Nov 27
1
[PATCH v6 28/46] vhost: make features 64 bit
...ons(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..c624b09 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,7 +106,7 @@ struct vhost_virtqueue { /* Protected by virtqueue mutex. */ struct vhost_memory *memory; void *private_data; - unsigned acked_features; + u64 acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -174,6 +174,6 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features &amp...
2014 Nov 27
1
[PATCH v6 28/46] vhost: make features 64 bit
...ons(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..c624b09 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,7 +106,7 @@ struct vhost_virtqueue { /* Protected by virtqueue mutex. */ struct vhost_memory *memory; void *private_data; - unsigned acked_features; + u64 acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -174,6 +174,6 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features &amp...
2014 Jun 05
1
[PATCH v2 1/2] vhost: move acked_features to VQs
...s(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 35eeb2a..ff454a0 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -105,6 +105,7 @@ struct vhost_virtqueue { struct vring_used_elem *heads; /* Protected by virtqueue mutex. */ void *private_data; + unsigned acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -117,7 +118,6 @@ struct vhost_dev { struct vhost_memory __rcu *memory; struct mm_struct *mm; struct mutex mutex; - unsigned acked_features; struct vhost_virtqueue **vqs; int nvqs; struct file *log_file;...
2014 Jun 05
1
[PATCH v2 1/2] vhost: move acked_features to VQs
...s(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 35eeb2a..ff454a0 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -105,6 +105,7 @@ struct vhost_virtqueue { struct vring_used_elem *heads; /* Protected by virtqueue mutex. */ void *private_data; + unsigned acked_features; /* Log write descriptors */ void __user *log_base; struct vhost_log *log; @@ -117,7 +118,6 @@ struct vhost_dev { struct vhost_memory __rcu *memory; struct mm_struct *mm; struct mutex mutex; - unsigned acked_features; struct vhost_virtqueue **vqs; int nvqs; struct file *log_file;...
2011 Jan 18
0
[PATCHv2] vhost: rcu annotation fixup
...&sock->sk->sk_receive_queue)) return; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2af44b7..b3363ae 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -173,9 +173,9 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit) { unsigned acked_features; - acked_features = - rcu_dereference_index_check(dev->acked_features, - lockdep_is_held(&dev->mutex)); + /* TODO: check that we are running from vhost_worker or dev mutex is + * held? */ + acked_features = rcu_dereference_index_check(dev->acked_features, 1); return acked...
2011 Jan 18
0
[PATCHv2] vhost: rcu annotation fixup
...&sock->sk->sk_receive_queue)) return; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2af44b7..b3363ae 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -173,9 +173,9 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit) { unsigned acked_features; - acked_features = - rcu_dereference_index_check(dev->acked_features, - lockdep_is_held(&dev->mutex)); + /* TODO: check that we are running from vhost_worker or dev mutex is + * held? */ + acked_features = rcu_dereference_index_check(dev->acked_features, 1); return acked...
2014 Nov 26
2
[PATCH v4 25/42] vhost: add memory access wrappers
...ost/vhost.h > > index 3eda654..b9032e8 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -174,6 +174,37 @@ enum { > > > > static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > { > > - return vq->acked_features & (1 << bit); > > + return vq->acked_features & (1ULL << bit); > > Should this hunk go into patch 28? Well, this is needed here since 1 << 32 is not legal C. I can move it - this means patch 28 will have to move earlier in series though. > > +}
2014 Nov 26
2
[PATCH v4 25/42] vhost: add memory access wrappers
...ost/vhost.h > > index 3eda654..b9032e8 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -174,6 +174,37 @@ enum { > > > > static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > { > > - return vq->acked_features & (1 << bit); > > + return vq->acked_features & (1ULL << bit); > > Should this hunk go into patch 28? Well, this is needed here since 1 << 32 is not legal C. I can move it - this means patch 28 will have to move earlier in series though. > > +}
2014 Nov 25
2
[PATCH v4 25/42] vhost: add memory access wrappers
...2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..b9032e8 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -174,6 +174,37 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features & (1ULL << bit); +} + +/* Memory accessors */ +static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) +{ + return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline __virtio16...
2014 Nov 25
2
[PATCH v4 25/42] vhost: add memory access wrappers
...2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..b9032e8 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -174,6 +174,37 @@ enum { static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { - return vq->acked_features & (1 << bit); + return vq->acked_features & (1ULL << bit); +} + +/* Memory accessors */ +static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) +{ + return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline __virtio16...