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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 98844C432C3 for ; Wed, 20 Nov 2019 21:07:42 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B55E2088F for ; Wed, 20 Nov 2019 21:07:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QhNJaMMY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B55E2088F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4FA36879CD; Wed, 20 Nov 2019 21:07:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SAS3pBon21WW; Wed, 20 Nov 2019 21:07:41 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id D5BC88658D; Wed, 20 Nov 2019 21:07:41 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BA63DC1DC9; Wed, 20 Nov 2019 21:07:41 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 96085C18DA for ; Wed, 20 Nov 2019 21:07:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 844E5879CD for ; Wed, 20 Nov 2019 21:07:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7pec8IBZGuhZ for ; Wed, 20 Nov 2019 21:07:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by hemlock.osuosl.org (Postfix) with ESMTPS id DC13E8658D for ; Wed, 20 Nov 2019 21:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574284058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8MFDaxa6RF7dmt3Rxp0QolGSZ/pxc+3gpIsDqUic5QU=; b=QhNJaMMYjTtac/j3l59FK0UsPQpwv/SDbq90GmWR1QDSmE3nFxGFgXbxovZUsyTv1HnYOu gYcKomcf6grG5VtxHRqVQjjsNC2U8KPw1t8mduv7JY2s7cpCJxCTuIHr+lB5aO/G0v6se9 lkFSIqdHAjCcd+X5Dr8hG2KpFYMAnvI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-130-584KKkRzOi6JzDXU_vgHcA-1; Wed, 20 Nov 2019 16:07:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0F13DB20; Wed, 20 Nov 2019 21:07:32 +0000 (UTC) Received: from [10.36.116.37] (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9F035F761; Wed, 20 Nov 2019 21:07:29 +0000 (UTC) Subject: Re: [PATCH v3 7/8] iommu/vt-d: Avoid sending invalid page response To: Jacob Pan , iommu@lists.linux-foundation.org, LKML , Joerg Roedel , Lu Baolu , David Woodhouse References: <1574186193-30457-1-git-send-email-jacob.jun.pan@linux.intel.com> <1574186193-30457-8-git-send-email-jacob.jun.pan@linux.intel.com> From: Auger Eric Message-ID: Date: Wed, 20 Nov 2019 22:07:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1574186193-30457-8-git-send-email-jacob.jun.pan@linux.intel.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 584KKkRzOi6JzDXU_vgHcA-1 X-Mimecast-Spam-Score: 0 Cc: "Tian, Kevin" , Raj Ashok X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Jacob, On 11/19/19 6:56 PM, Jacob Pan wrote: > Page responses should only be sent when last page in group (LPIG) or > private data is present in the page request. This patch avoids sending > invalid descriptors. > > Fixes: 5d308fc1ecf53 ("iommu/vt-d: Add 256-bit invalidation descriptor > support") > Signed-off-by: Jacob Pan > Acked-by: Lu Baolu R-b sent on v2 Reviewed-by: Eric Auger Eric > --- > drivers/iommu/intel-svm.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c > index 71b85b892c56..4eecc24412dc 100644 > --- a/drivers/iommu/intel-svm.c > +++ b/drivers/iommu/intel-svm.c > @@ -686,11 +686,10 @@ static irqreturn_t prq_event_thread(int irq, void *d) > if (req->priv_data_present) > memcpy(&resp.qw2, req->priv_data, > sizeof(req->priv_data)); > + resp.qw2 = 0; > + resp.qw3 = 0; > + qi_submit_sync(&resp, iommu); > } > - resp.qw2 = 0; > - resp.qw3 = 0; > - qi_submit_sync(&resp, iommu); > - > head = (head + sizeof(*req)) & PRQ_RING_MASK; > } > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu