Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3649116imm; Thu, 17 May 2018 12:11:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZovlp5Und0uCZ01MKtNgbSs8GY+NEBlvVpS2y41hEkGZdW1bRMbft0cIDw2Q7+TDSWYGZpr X-Received: by 2002:a63:7453:: with SMTP id e19-v6mr4810222pgn.87.1526584310479; Thu, 17 May 2018 12:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526584310; cv=none; d=google.com; s=arc-20160816; b=EJnp75yGN2bTX44w6HWad0so0Mi5QcydEm2XifGImws1JT7+Wi0+szCtOpmpeFBBhw FIV5mlgdBeSRHrKTE29rRaHmvNk8s2SZv4n55p61gq14z8Ump6mrcXkAzEe8jbFfWXdL hP0tqmI2FAJQM8vusm5CI9sMc7qpI9XBUNueTXxcfnZUDb4YOH6YmG2Dy9bOpDN2oJNW 59ORbvBY3uFXPxEPQxyeNQuMkWOEWZuM6IFra8EhAfHrHumzsRJMoo8ekE97VqTIEL5Y nC66IlMVNjOXUcpPR5r4R6st5wFxwCW2gkfV73yKDjaAIaF/2hra7ThPSN9FMURID2kw lCdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ckeoUQFwzgx1AAp8wXh07MGCsabmqGDkUBRV7dldH2A=; b=PNcgGX8TviGtCbOxZuPjjW8cngGArzCjBZjh/2fjKbIZwXnevWR2Nhs9w6Fy00GnhJ LZH5Z0CcL3NyscO6jVmMf6NzGpYlwyorxNjzxn+QdSfwXOtu0N8nzDw7FyIYjSIRMw/w GZxXSjaM5EDdWgyMoRo904InozeSWonJmOC4j60ztHtI0vADLdLt8VM0vpSNecZxv8l/ flKD+k/P0ykcZEwmHvP6YYpyMbOUykN0Tgo9RqDy7Rkv1XZ7KuWOIFLuaR5WWdI6Mg15 VYuWHbsr9hj4QQukWWsmO6va359b62sI+DD6WHF6PdH2LJWX9h3n2Ye0q/xzIPRTyY8w JyZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iLEdpJAx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24-v6si6046779pfj.292.2018.05.17.12.11.35; Thu, 17 May 2018 12:11:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iLEdpJAx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976AbeEQTKX (ORCPT + 99 others); Thu, 17 May 2018 15:10:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:39930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750924AbeEQTKV (ORCPT ); Thu, 17 May 2018 15:10:21 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDF1B2083D; Thu, 17 May 2018 19:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526584221; bh=zylohM2QISbhXbrPPVvGUesi9Y1vXVKCSCVtmJmodvQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iLEdpJAxcgSZkeRXr8dB7o6y/4+95IUk4ferFd8y2WyQAUEW+nQKRvlfeEvAthhVB KTg+Rf/+TqPoi6tzn8erRJianKJ2aEj9eXCf4f74ImOO1eWOWUgj6bCO9fZXi3Xzuh EthbpRVf90aod2+OHcJ3jDlXCi69fOpnGyftAz1A= Date: Thu, 17 May 2018 21:10:03 +0200 From: Greg KH To: Joe Jin Cc: Konrad Rzeszutek Wilk , John Sobecki , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , ASHISH_B_SRIVASTAVA , stable@vger.kernel.org Subject: Re: [PATCH UPSTREAM] xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent Message-ID: <20180517191003.GD504@kroah.com> References: <25d8a709-9f2f-fe09-f66c-2a0704ddbbb0@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25d8a709-9f2f-fe09-f66c-2a0704ddbbb0@oracle.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 11:45:57AM -0700, Joe Jin wrote: > When run raidconfig from Dom0 we found that the Xen DMA heap is reduced, > but Dom Heap is increased by the same size. Tracing raidconfig we found > that the related ioctl() in megaraid_sas will call dma_alloc_coherent() > to apply memory. If the memory allocated by Dom0 is not in the DMA area, > it will exchange memory with Xen to meet the requiment. Later drivers > call dma_free_coherent() to free the memory, on xen_swiotlb_free_coherent() > the check condition (dev_addr + size - 1 <= dma_mask) is always false, > it prevents calling xen_destroy_contiguous_region() to return the memory > to the Xen DMA heap. > > This issue introduced by commit 6810df88dcfc2 "xen-swiotlb: When doing > coherent alloc/dealloc check before swizzling the MFNs.". > > Signed-off-by: Joe Jin > Tested-by: John Sobecki > Reviewed-by: Rzeszutek Wilk > Cc: stable@vger.kernel.org > --- > drivers/xen/swiotlb-xen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) What does "PATCH UPSTREAM" mean? confused, greg k-h