[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V2





On Wed, Nov 28, 2018, 10:08 Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx wrote:
>
> You already cannot do that kmalloc(), exactly because of ERR_PTR().

I'm very sorry, but I think you are confused.

kmalloc() returns a _virtual_ address, which quite rightly must not be
in the top 4K of 4GB, exactly due to ERR_PTR().  That is fine.

However, that is a completely different kettle of fish from a physical
or DMA address - neither of which are virtual addresses.

You cut away the part that showed that I'm not in the least confused.

Let me just paste it back in here:

  "Which is what we ALREADY do for these exact reasons. If the DMA
mappings means that you'd need to add one more page to that list of
reserved pages, then so be it."

So no, I'm not at all confused. 

Let me re-iterate: the argument that all addresses have to be dma'able is garbage. 

*Exactly* as with kmalloc and limited virtual addresses, we can limit physical addresses.

      Linus
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.