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