xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Eric Camachat <eric.camachat@gmail.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Can I specify a physical memory region for a domU
Date: Thu, 8 Sep 2011 11:56:07 -0700	[thread overview]
Message-ID: <CACeEFf4DPzaO9ETHKXg5GAyr4YJmpuHx+0EK_ONR3758w=FCbA@mail.gmail.com> (raw)
In-Reply-To: <20110908181205.GA19078@dumpdata.com>

On Thu, Sep 8, 2011 at 11:12 AM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> 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@oracle.com> 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!

  reply	other threads:[~2011-09-08 18:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08  0:47 Can I specify a physical memory region for a domU Eric Camachat
2011-09-08  8:50 ` Tim Deegan
2011-09-08 12:59 ` Konrad Rzeszutek Wilk
2011-09-08 17:22   ` Eric Camachat
2011-09-08 18:12     ` Konrad Rzeszutek Wilk
2011-09-08 18:56       ` Eric Camachat [this message]
2011-09-08 20:00         ` Konrad Rzeszutek Wilk
2011-09-09  0:15           ` Eric Camachat
2011-09-09  1:05             ` Konrad Rzeszutek Wilk
2011-09-09 16:10               ` Eric Camachat
2011-09-09 16:48                 ` Eric Camachat
2011-09-09 18:06                   ` Konrad Rzeszutek Wilk
2011-09-09 19:19                     ` Eric Camachat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACeEFf4DPzaO9ETHKXg5GAyr4YJmpuHx+0EK_ONR3758w=FCbA@mail.gmail.com' \
    --to=eric.camachat@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).