On Thu, Oct 26, 2023 at 02:48:14PM +0800, Ethan Chen wrote: > My target is to support IOPMP partially hit error. IOPMP checks whole memory > access region is in the same entry. If not, reject the access instead of > modify > the access size.
Could you elaborate why is that important? In what use case? Consider IOVA mapped for address range iova=[0, 4K] only, here we have a DMA request with range=[0, 8K]. Now my understanding is what you want to achieve is don't trigger the DMA to [0, 4K] and fail the whole [0, 8K] request. Can we just fail at the latter DMA [4K, 8K] when it happens? After all, IIUC a device can split the 0-8K DMA into two smaller DMAs, then the 1st chunk can succeed then if it falls in 0-4K. Some further explanation of the failure use case could be helpful. Thanks, -- Peter Xu