[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOT
From: |
Peter Xu |
Subject: |
Re: [RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type |
Date: |
Wed, 26 Aug 2020 11:50:10 -0400 |
On Wed, Aug 26, 2020 at 04:36:41PM +0200, Eugenio Pérez wrote:
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
> hw/alpha/typhoon.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index 29d44dfb06..b1e6c4e929 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -615,6 +615,7 @@ static bool make_iommu_tlbe(hwaddr taddr, hwaddr mask,
> IOMMUTLBEntry *ret)
> .translated_addr = taddr,
> .addr_mask = mask,
> .perm = IOMMU_RW,
> + .type = IOMMU_IOTLB_NONE,
IMHO we don't need to touch all the IOMMUTLBEntry users, but only the callers
of memory_region_notify_iommu*(). We should also comment at the type field
that it's meaningless except when used for IOMMU notifications, because these
are really two different things: IOMMUTLBEntry was originally a translated
entry out of IOMMU hardware, so in those case it does not need a "type" field.
To make it clearer (depending on your preference...), we can introduce
IOMMUTLBEvent to be:
struct IOMMUTLBEvent {
IOMMUTLBEntry entry;
IOMMUTLBType type;
};
Then it'll be clear on which is which. Though you'll need to touch more things
(all the callers and all the registerered notifiers).
Thanks,
--
Peter Xu
- [RFC v6 00/13] memory: Delete assertion in memory_region_unregister_iommu_notifier, Eugenio Pérez, 2020/08/26
- [RFC v6 01/13] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one, Eugenio Pérez, 2020/08/26
- [RFC v6 02/13] memory: Add IOMMUTLBNotificationType to IOMMUTLBEntry, Eugenio Pérez, 2020/08/26
- [RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type, Eugenio Pérez, 2020/08/26
- Re: [RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type,
Peter Xu <=
- [RFC v6 04/13] amd_iommu: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type, Eugenio Pérez, 2020/08/26
- [RFC v6 05/13] hw/arm/smmu: Fill IOMMUTLBEntry notifier type, Eugenio Pérez, 2020/08/26
- [RFC v6 06/13] dma/rc4030: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type, Eugenio Pérez, 2020/08/26
- [RFC v6 07/13] intel_iommu: Mark IOMMUTLBEntry of page notification as IOMMU_IOTLB_UNMAP type, Eugenio Pérez, 2020/08/26
- [RFC v6 08/13] virtio-iommu: Mark virtio_iommu_translate IOTLB as IOMMU_IOTLB_NONE type, Eugenio Pérez, 2020/08/26
- [RFC v6 09/13] intel_iommu: Set IOMMUTLBEntry type in vtd_page_walk_level, Eugenio Pérez, 2020/08/26
- [RFC v6 10/13] memory: Notify IOMMU IOTLB based on entry type, not permissions, Eugenio Pérez, 2020/08/26
- [RFC v6 11/13] memory: Add IOMMU_DEVIOTLB_UNMAP IOMMUTLBNotificationType, Eugenio Pérez, 2020/08/26
- [RFC v6 12/13] intel_iommu: Do not notify regular iotlb to device-iotlb notifiers, Eugenio Pérez, 2020/08/26