On Thu, Jun 02, 2011 at 12:28:53PM -0700, Richard Henderson wrote:
> On 06/02/2011 10:35 AM, Eduard - Gabriel Munteanu wrote:
> > My latest patches seem to have fixed that:
> >
> > +if (plen < *len) {
> > +*len = plen;
> > +}
> > +
> > +buf = cpu_physical_memory_map(paddr, len,
On 06/02/2011 10:35 AM, Eduard - Gabriel Munteanu wrote:
> My latest patches seem to have fixed that:
>
> +if (plen < *len) {
> +*len = plen;
> +}
> +
> +buf = cpu_physical_memory_map(paddr, len, is_write);
No, len is (or was in previous patches) dma_addr_t which
is not the sa
On Thu, Jun 02, 2011 at 09:43:32AM -0700, Richard Henderson wrote:
> On 06/02/2011 08:12 AM, David Gibson wrote:
> > +err = iommu->translate(dev, addr, &paddr, &plen, is_write);
> > +if (err) {
> > +return NULL;
> > +}
> > +
> > +/*
> > + * If this is true, the virtual r
On 06/02/2011 08:12 AM, David Gibson wrote:
> +err = iommu->translate(dev, addr, &paddr, &plen, is_write);
> +if (err) {
> +return NULL;
> +}
> +
> +/*
> + * If this is true, the virtual region is contiguous,
> + * but the translated physical region isn't. We just
>
This introduces replacements for memory access functions like
cpu_physical_memory_read(). The new interface can handle address
translation and access checking through an IOMMU.
David Gibson: I have made several bugfixes and cleanups to Eduard's
original patch.
* dma_memory_rw() was incorrectly u