From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: x86 swiotlb questions Date: Mon, 18 Dec 2006 07:44:56 +0000 Message-ID: <45865508.76E4.0078.0@novell.com> References: <4582A833.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> - What is the purpose of using alloc_bootmem_low variants here? I.e., where is >> the dependency on physical addresses being below 4G here (machine addresses >are >> being restricted after the allocation anyway)? The panic message text after >> the >> failed allocation is confusing me additionally. > >This is how it's always been since we took ia64's swiotlb.c. Okay, then I must have forgotten about how it looked like. However, the specific panic message has a Xen-specific addition, so I still wonder what its background is... >> - While I can see the idea behind the overflow buffer, it doesn't seem to >> prevent >> data corruption, and if I understand it correctly it doesn't even prevent >> memory >> corruption (since its machine address doesn't get restricted anywhere, so the >> fall >> back return value would not necessarily meet the device requirements). > >Same here. We didn't implement this. It doesn't seem to make that much >sense. Sync'ing with lib/swiotb.c and throwing away our special one would be >very nice. :-) Trying to do that I find one extra issue: in_swiotlb_aperture() does its check based on pfn, while lib/swiotlb.c uses the virtual address in the respective checks instead. Is there some subtlety behind that (that then should be commented upon), or is this just due to this originally having been an mfn-based check? Thanks, Jan