Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756191AbaKTLl2 (ORCPT ); Thu, 20 Nov 2014 06:41:28 -0500 Received: from smtp.nue.novell.com ([195.135.221.5]:55681 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbaKTLl1 convert rfc822-to-8bit (ORCPT ); Thu, 20 Nov 2014 06:41:27 -0500 X-Greylist: delayed 1200 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Nov 2014 06:41:27 EST Message-Id: <546DDCC302000078000494C9@smtp.nue.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Thu, 20 Nov 2014 12:21:23 +0100 From: "Jan Beulich" To: "David Vrabel" Cc: , "Thomas Gleixner" , "Greg Kroah-Hartman" , , "Boris Ostrovsky" , "Ingo Molnar" , , "H. Peter Anvin" Subject: Re: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask References: <1416412921-23671-1-git-send-email-david.vrabel@citrix.com> <1416412921-23671-5-git-send-email-david.vrabel@citrix.com> In-Reply-To: <1416412921-23671-5-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 19.11.14 at 17:02, wrote: > On a Xen PV guest the DMA addresses and physical addresses are not 1:1 > (such as Xen PV guests) and the generic dma_get_required_mask() does > not return the correct mask (since it uses max_pfn). > > Some device drivers (such as mptsas, mpt2sas) use > dma_get_required_mask() to set the device's DMA mask to allow them to > use only 32-bit DMA addresses in hardware structures. This results in > unnecessary use of the SWIOTLB if DMA addresses are more than 32-bits, > impacting performance significantly. > > Provide a get_required_mask op that uses the maximum MFN to calculate > the DMA mask. > > Signed-off-by: David Vrabel Reviewed-by: Jan Beulich -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/