From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42861C433F4 for ; Sun, 26 Aug 2018 00:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9E2B20A8B for ; Sun, 26 Aug 2018 00:40:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9E2B20A8B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=davemloft.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbeHZEVB (ORCPT ); Sun, 26 Aug 2018 00:21:01 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:60784 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbeHZEVB (ORCPT ); Sun, 26 Aug 2018 00:21:01 -0400 Received: from localhost (50-243-110-91-static.hfc.comcastbusiness.net [50.243.110.91]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id B9C611462134F; Sat, 25 Aug 2018 17:40:21 -0700 (PDT) Date: Sat, 25 Aug 2018 17:40:21 -0700 (PDT) Message-Id: <20180825.174021.1633894476704616364.davem@davemloft.net> To: jasowang@redhat.com Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterx@redhat.com Subject: Re: [PATCH net] vhost: correctly check the iova range when waking virtqueue From: David Miller In-Reply-To: <20180824085313.21798-1-jasowang@redhat.com> References: <20180824085313.21798-1-jasowang@redhat.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 25 Aug 2018 17:40:22 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Wang Date: Fri, 24 Aug 2018 16:53:13 +0800 > We don't wakeup the virtqueue if the first byte of pending iova range > is the last byte of the range we just got updated. This will lead a > virtqueue to wait for IOTLB updating forever. Fixing by correct the > check and wake up the virtqueue in this case. > > Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API") > Reported-by: Peter Xu > Signed-off-by: Jason Wang > --- > The patch is needed for -stable. Applied and queued up for -stable, thanks Jason.