WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pvops: AHCI problems with SB600

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] pvops: AHCI problems with SB600
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Wed, 23 Sep 2009 14:56:16 -0700
Cc: Patrick Scharrenberg <pittipatti@xxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Sep 2009 14:56:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090923212457.GA5816@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4AB431AD.1030205@xxxxxxxx> <4AB4EEB8.7050107@xxxxxx> <20090921150634.GD20933@xxxxxxxxxxxxxxxxxxx> <4AB89227.8050302@xxxxxx> <20090922140825.GB21736@xxxxxxxxxxxxxxxxxxx> <20090923120646.GA3199@xxxxxxxxxxxxxxxxxxx> <4ABA7578.8030201@xxxxxxxx> <20090923193245.GA5682@xxxxxxxxxxxxxxxxxxx> <4ABA8088.1080807@xxxxxxxx> <4ABA8574.2060501@xxxxxxxx> <20090923212457.GA5816@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
On 09/23/09 14:24, Konrad Rzeszutek Wilk wrote:
> The weird part is that the function you copied-n-pasted (gart_iommu_hole_init)
> only detectes and allocates a buffer. It does not set the dma_ops at all.
> Setting of the dma_ops is done via the gart_iommu_init() call which is done
> much later. But with Xen-SWIOTLB already initialized, the gart_iommu_init()
> quits right away.
>   

Perhaps the fix is to make gart_iommu_hole_init() quit if iommu_detected
too?  Though it is called after xen_swiotlb_init()...

> So the kernel sets the dma_ops to the Xen SWIOTLB, and it
> allocates an extra 64MB chunk of memory for the GART, which is not
> used, and ... somehow all of the ioremap_nocache functions stop working
> correctly. Maybe the ioremap_nocache does use some of that memory that
> the gart_iommu_hole_init allocated?
>   
Can't see how it would affect it.  ioremap allocates a new virtual space
for the mapping and then just plugs in the pfns for the pages you want
to map.  They end up getting _PAGE_IOMAP set in the pte flags, which
causes the xen/mmu.c backend to use the address as-is (ie, as an mfn),
so the mapping will be constructed properly.  Well, that's the theory;
but I'd expect we'd be seeing a lot more havok of ioremap is either
mapping the wrong pages or using the wrong caching.

> With this patch, the GART is forcefully disabled, and the kernel boots fine
> (with 6GB, 8GB, etc).
>   

OK, I'll put it in for now.  Will we have issues with other forms of iommu?

Another thought, could we actually use the gart iommu instead of swiotlb
if it is available?  I think it leads to exactly the same set of issues
as extending normal swiotlb for Xen's use (ie, inserting pfn->mfn
conversion into the correct places, and perhaps allocating the memory
properly).  Worth thinking about; it may shine light on better ways to
fix up swiotlb.

Thanks,
    J


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>