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] Can I specify a physical memory region for a domU

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Can I specify a physical memory region for a domU
From: Eric Camachat <eric.camachat@xxxxxxxxx>
Date: Thu, 8 Sep 2011 11:56:07 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 08 Sep 2011 11:57:36 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=wY4k3hW55lfnKkg4EMO3c1qKU8VZfJ6C1P4ArvcPskc=; b=rIJro7RYU2bS15iBkEV1DDS8lsWmf3SG3PnBNKRnocdzW/F0rapz8D7pUEnbPIRzsO dTIM3Mb4XYqz7rkCBB8EVZQLb04qOpylNGO7aJNJ8ifU4JR9SCVEU3830LUjS+pK/8Mp +BmlI6qIJzxQxPt5NFSKUUE4l2EnhFsNGixwM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110908181205.GA19078@xxxxxxxxxxxx>
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: <CACeEFf6dh0AZ2Py2a3YWtGkQoHmVWMehFgz52tUBNJ80d+n7HQ@xxxxxxxxxxxxxx> <20110908125920.GC28591@xxxxxxxxxxxx> <CACeEFf7kH0K1k3_g2bMXkV8_5zMuEJ94bUcWLzDEwUorXtgigA@xxxxxxxxxxxxxx> <20110908181205.GA19078@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, Sep 8, 2011 at 11:12 AM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> On Thu, Sep 08, 2011 at 10:22:01AM -0700, Eric Camachat wrote:
>> On Thu, Sep 8, 2011 at 5:59 AM, Konrad Rzeszutek Wilk
>> <konrad.wilk@xxxxxxxxxx> wrote:
>> > On Wed, Sep 07, 2011 at 05:47:46PM -0700, Eric Camachat wrote:
>> >> Hi,
>> >>
>> >> I am porting our drivers to XEN's PV domU (with PV PCI passthrouth), I
>> >
>> > Use the DMA API that Linux provides (I presume that is what you meant
>> > by PV DomU), and use the dma_alloc_coherent to set your regions.
>>
>> That's what I thought before. We use a shared DMA region for multiple 
>> hardware.
>> Maybe I can dma_alloc_coherent for 1st and the others use the same region.
>
> You can definitly try it. Or use the dmapool API to get a shared
> pool of coherent memory.
>
>> I will try it.
>>
>> >
>> > Also pass in 'iommu=soft' on your Linux command line to enable the
>> > Xen SWIOTLB DMA system.
>> >
>> >> have to allocate a memory block and tell the hardware to access it.
>> >> But the hardware can address 32-bit only, so I want dedicate a region
>> >> of memory that below 2GB for the domU only.
>> >
>> > Uh, don't you mean 4GB? - 32bit is up to 4GB.
>>
>> The hardware uses 32-bit addressing, but the system will crash if I
>> assigned above 2GB address to it.
>
> Ha! so buggy hardware.. or you are not using the XEn-SWIOTLB but something
> else.
>> So, 4GB from hardware spec, 2GB from my test. I am looking into that.
>
> Make sure you set
>  pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(31));
>
> on top of pci_set_dma_mask(dev, DMA_BIT_MASK(31));
> in your driver.
>
A lot of work to port the driver to PV domU, hope it works.
Thanks for your help!

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