search for: vhost_iotlb_hash

Displaying 3 results from an estimated 3 matches for "vhost_iotlb_hash".

2015 Dec 31
4
[PATCH RFC] vhost: basic device IOTLB support
...rn r; diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index eec2f11..729fe05 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -113,6 +113,11 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq) } #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */ +static inline int vhost_iotlb_hash(u64 iova) +{ + return (iova >> PAGE_SHIFT) & (VHOST_IOTLB_SIZE - 1); +} + static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, poll_table *pt) { @@ -384,8 +389,14 @@ void vhost_dev_init(struct vhost_dev *dev, dev->memory = NULL; dev->mm = NULL; spin...
2015 Dec 31
4
[PATCH RFC] vhost: basic device IOTLB support
...rn r; diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index eec2f11..729fe05 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -113,6 +113,11 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq) } #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */ +static inline int vhost_iotlb_hash(u64 iova) +{ + return (iova >> PAGE_SHIFT) & (VHOST_IOTLB_SIZE - 1); +} + static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, poll_table *pt) { @@ -384,8 +389,14 @@ void vhost_dev_init(struct vhost_dev *dev, dev->memory = NULL; dev->mm = NULL; spin...
2015 Dec 31
0
[PATCH RFC] vhost: basic device IOTLB support
...b/drivers/vhost/vhost.c > index eec2f11..729fe05 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -113,6 +113,11 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq) > } > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */ > > +static inline int vhost_iotlb_hash(u64 iova) > +{ > + return (iova >> PAGE_SHIFT) & (VHOST_IOTLB_SIZE - 1); > +} > + > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, > poll_table *pt) > { > @@ -384,8 +389,14 @@ void vhost_dev_init(struct vhost_dev *dev, > dev-&...