[Top][All Lists]

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

Re: [Qemu-devel] Re: [PATCH 1/5] Add target memory mapping API

From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH 1/5] Add target memory mapping API
Date: Mon, 26 Jan 2009 12:03:57 -0600
User-agent: Thunderbird (X11/20090105)

Ian Jackson wrote:
Anthony Liguori writes ("Re: [Qemu-devel] Re: [PATCH 1/5] Add target memory mapping 
Ian Jackson wrote:
I think my most recently sketched-out proposal (where the caller
passes a DMA sg list to the mapping request function) doesn't have
these deadlocks ?
But what do you do with a DMA request that cannot possibly be bounced but that can be split? In other words, a DMA request to 1G of MMIO memory that is disk access. We can absolutely split that into multiple requests.

You impose a maximum size for any DMA request; that is, a maximum size
that callers of the DMA API are allowed to request.  Any larger
request is a bug.  Callers who might want to try to map bigger blocks
need to be able to split.

Alternatively you can have the API return an `amount mapped' on the
callback, but state that this number will always be at least
DMA_MAP_SG_GUARANTEE_MIN if at least that amount was requested.

For that to be useful for network traffic, it has to be at least 64k. If isn't at least 64k, then the NIC code must deal with two cases, one where it was able to map and one where it wasn't able to map.

In the general case, we can't know ahead of time what the largest MIN is to make all devices happy.


Anthony Liguori


reply via email to

[Prev in Thread] Current Thread [Next in Thread]