[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size functio
|
From: |
Ethan Chen |
|
Subject: |
Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented |
|
Date: |
Fri, 27 Oct 2023 11:28:36 +0800 |
|
User-agent: |
Mutt/2.1.4 (2021-12-11) |
On Thu, Oct 26, 2023 at 10:20:41AM -0400, Peter Xu wrote:
> Could you elaborate why is that important? In what use case?
I was not involved in the formulation of the IOPMP specification, but I'll try
to explain my perspective. IOPMP use the same the idea as PMP. "The matching
PMP entry must match all bytes of an access, or the access fails."
>
> 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.
IOPMP can only detect partially hit in an access. DMA device will split a
large DMA transfer to small DMA transfers base on target and DMA transfer
width, so partially hit error only happens when an access cross the boundary.
But to ensure that an access is only within one entry is still important.
For example, an entry may mean permission of a device memory region. We do
not want to see one DMA transfer can access mutilple devices, although DMA
have permissions from multiple entries.
Thanks,
Ethan Chen
- [PATCH 0/6] Support RISC-V IOPMP, Ethan Chen, 2023/10/25
- [PATCH 4/6] Add RISC-V IOPMP support, Ethan Chen, 2023/10/25
- [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Ethan Chen, 2023/10/25
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Peter Xu, 2023/10/25
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented,
Ethan Chen <=
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Peter Xu, 2023/10/27
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Peter Xu, 2023/10/27
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Ethan Chen, 2023/10/30
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Peter Xu, 2023/10/30
- Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented, Ethan Chen, 2023/10/31
[PATCH 3/6] exec/memattrs: Add iopmp source id to MemTxAttrs, Ethan Chen, 2023/10/25
[PATCH 5/6] hw/dma: Add Andes ATCDMAC300 support, Ethan Chen, 2023/10/25
[PATCH 6/6] hw/riscv/virt: Add IOPMP support, Ethan Chen, 2023/10/25
Re: [PATCH 0/6] Support RISC-V IOPMP, Ethan Chen, 2023/10/26