All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Eric Camachat <eric.camachat@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Can I specify a physical memory region for a domU
Date: Fri, 9 Sep 2011 14:06:01 -0400	[thread overview]
Message-ID: <20110909180601.GA5560@oracle.com> (raw)
In-Reply-To: <CACeEFf7w+rEUwHeLwA47whFO6OmKUrfWE0N5c4EPnuUX=Niw-g@mail.gmail.com>

On Fri, Sep 09, 2011 at 09:48:03AM -0700, Eric Camachat wrote:
> On Fri, Sep 9, 2011 at 9:10 AM, Eric Camachat <eric.camachat@gmail.com> wrote:
> > On Thu, Sep 8, 2011 at 6:05 PM, Konrad Rzeszutek Wilk
> > <konrad.wilk@oracle.com> wrote:
> >> On Thu, Sep 08, 2011 at 05:15:06PM -0700, Eric Camachat wrote:
> >>> On Thu, Sep 8, 2011 at 1:00 PM, Konrad Rzeszutek Wilk
> >>> <konrad.wilk@oracle.com> wrote:
> >>> >> > 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.
> >>> >
> >>> > Hm? That is the normal way you would write drivers in the Linux kernel.
> >>> > You use the DMA API in it to deal with the PCI devices.
> >>> >
> >>> > Is the PV domU a Linux kernel or something else?
> >>> >
> >>>
> >>> Yes, the PV domU is linux kernel.
> >>>
> >>> I tested pci_alloc_consistent() verified on baremetal it worked with 8GB SDRAM.
> >>> But while I ran it in XEN, pci_alloc_consistent() cannot allocate
> >>> memory successfully for 4MB although pci_set_dma_mask(),
> >>
> >> And what is the error?
> >
> > I cannot see any error, it just returned NULL.
> 
> BTW, I will succeed if I allocate 2MB only.

Ok, that is unsurprising. I don't know if you can do it any better on baremetal.
But I am failing to understand why you need such large swaths of contingous
memory. You can't do scatter gather? Or scatter gather on 2MB chunks?

  reply	other threads:[~2011-09-09 18:06 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
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 [this message]
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=20110909180601.GA5560@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=eric.camachat@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.