Re: [PATCH 1/2] vhost: remove the possible fruitless search on iotlb prefetch

From
Jason Wang <hidden>
Date
2017-08-21 03:09:07
Also in
kvm
Reply to
Koichiro Den, 2017-08-19

On 2017年08月19日 14:41, Koichiro Den wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Koichiro Den <redacted>
---
  drivers/vhost/vhost.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index e4613a3c362d..93e909afc1c3 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1184,7 +1184,7 @@ static int iotlb_access_ok(struct vhost_virtqueue *vq,
  	while (len > s) {
  		node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
  							   addr,
-							   addr + len - 1);
+							   addr + len - s - 1);
  		if (node == NULL || node->start > addr) {
  			vhost_iotlb_miss(vq, addr, access);
  			return false;
Acked-by: Jason Wang <redacted>
Thread (4 messages) 4 messages, 3 authors, last reply 2017-08-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help