[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 9/9] xen/arm: Map ITS doorbell register to IOMMU page tables.



Hi,

On 07/11/2023 20:10, Stewart Hildebrand wrote:
+            ret = map_mmio_regions(its->d, gaddr_to_gfn(its->doorbell_address),
+                           PFN_UP(ITS_DOORBELL_OFFSET),
+                           maddr_to_mfn(its->doorbell_address));


A couple of remarks. Firstly, we know the ITS doorbell at domain
creation. So I think thish should be called from vgic_v3_its_init_virtual().

Regardless that, any code related to device initialization belongs to
gicv3_its_map_guest_device().

How about calling it from a map_hwdom_extra_mappings() hook?
For example see [1].

I don't think this is the correct place because sooner or later you will need the same mapping when enable the ITS for domUs. So I think the mapping should be part of vgic_v3_its_init_virtual().

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.