From patchwork Sat Aug 19 06:41:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K. Den" X-Patchwork-Id: 9910153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D3412602A0 for ; Sat, 19 Aug 2017 06:41:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C240E28DA3 for ; Sat, 19 Aug 2017 06:41:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B753028DA5; Sat, 19 Aug 2017 06:41:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4520828DA3 for ; Sat, 19 Aug 2017 06:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751029AbdHSGl2 (ORCPT ); Sat, 19 Aug 2017 02:41:28 -0400 Received: from sender-of-o52.zoho.com ([135.84.80.217]:21434 "EHLO sender-of-o52.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750854AbdHSGl1 (ORCPT ); Sat, 19 Aug 2017 02:41:27 -0400 Received: from localhost.localdomain (KD111107163154.au-net.ne.jp [111.107.163.154]) by mx.zohomail.com with SMTPS id 1503124884424309.7701459281335; Fri, 18 Aug 2017 23:41:24 -0700 (PDT) From: Koichiro Den To: mst@redhat.com, jasowang@redhat.com Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: [PATCH 1/2] vhost: remove the possible fruitless search on iotlb prefetch Date: Sat, 19 Aug 2017 15:41:14 +0900 Message-Id: <20170819064114.27219-1-den@klaipeden.com> X-Mailer: git-send-email 2.9.4 X-ZohoMailClient: External Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Koichiro Den Acked-by: Jason Wang --- 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;