On Wed, Aug 26, 2020 at 04:36:41PM +0200, Eugenio Pérez wrote: > Signed-off-by: Eugenio Pérez <epere...@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