[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 1/4] sun4m: implement IOMMU translation using
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCHv2 1/4] sun4m: implement IOMMU translation using IOMMU memory region |
Date: |
Fri, 27 Oct 2017 12:37:29 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 10/27/2017 09:19 AM, Mark Cave-Ayland wrote:
[...]
> +/* Called from RCU critical section */
> +static IOMMUTLBEntry sun4m_translate_iommu(IOMMUMemoryRegion *iommu,
> + hwaddr addr,
> + IOMMUAccessFlags flags)
> +{
> + IOMMUState *is = container_of(iommu, IOMMUState, iommu);
> + hwaddr page, pa;
> + int is_write = (flags & IOMMU_WO) ? 1 : 0;
> + uint32_t pte;
> + IOMMUTLBEntry ret = {
> + .target_as = &address_space_memory,
> + .iova = 0,
> + .translated_addr = 0,
> + .addr_mask = ~(hwaddr)0,
I never thought of it! I would have write (hwaddr)~0 but your way is
much cleaner.
> + .perm = IOMMU_NONE,
> + };
[...]
- [Qemu-devel] [PATCHv2 0/4] sun4m: implement memory region IOMMU translation and DMA API, Mark Cave-Ayland, 2017/10/27
- [Qemu-devel] [PATCHv2 2/4] sparc32_dma: switch over to using IOMMU memory region and DMA API, Mark Cave-Ayland, 2017/10/27
- [Qemu-devel] [PATCHv2 1/4] sun4m: implement IOMMU translation using IOMMU memory region, Mark Cave-Ayland, 2017/10/27
- Re: [Qemu-devel] [PATCHv2 1/4] sun4m: implement IOMMU translation using IOMMU memory region,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCHv2 4/4] sun4m: change TYPE_SUN4M_IOMMU macro from "iommu" to "sun4m-iommu", Mark Cave-Ayland, 2017/10/27
- [Qemu-devel] [PATCHv2 3/4] sun4m_iommu: remove legacy sparc_iommu_memory_rw() function, Mark Cave-Ayland, 2017/10/27
- Re: [Qemu-devel] [PATCHv2 0/4] sun4m: implement memory region IOMMU translation and DMA API, Philippe Mathieu-Daudé, 2017/10/27