Hi Eric, > -----Original Message----- > From: Eric Auger <eric.au...@redhat.com> > Sent: Thursday, November 14, 2024 8:42 AM > To: Shameerali Kolothum Thodi > <shameerali.kolothum.th...@huawei.com>; qemu-...@nongnu.org; > qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; j...@nvidia.com; nicol...@nvidia.com; > ddut...@redhat.com; Linuxarm <linux...@huawei.com>; Wangzhou (B) > <wangzh...@hisilicon.com>; jiangkunkun <jiangkun...@huawei.com>; > Jonathan Cameron <jonathan.came...@huawei.com>; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 2/5] hw/arm/smmuv3: Add initial support for > SMMUv3 Nested device
> >> why did you choose not using the PLATFORM BUS infra which does that > >> kind of binding automatically (also it provisions for dedicated MMIOs > and > >> IRQs). At least you would need to justify in the commit msg I think > > Because I was not sure how to do this binding otherwise. I couldn't find > > any such precedence for a dynamic platform bus dev binding > > MMIOs/IRQs(May be I didn't look hard). I mentioned it in cover letter. > > > > Could you please give me some pointers/example for this? I will also > > take another look. > vfio platform users such automatic binding (however you must check that > vfio platform bus mmio and irq space is large enough for your needs). > > the binding is transparently handled by > if (vms->platform_bus_dev) { > if (device_is_dynamic_sysbus(mc, dev)) { > > platform_bus_link_device(PLATFORM_BUS_DEVICE(vms- > >platform_bus_dev), > SYS_BUS_DEVICE(dev)); > } > } Ah..I see. I missed that it does that transparently. And use platform_bus_get_mmio_addr() for retrieving it for ACPI/DT similar to what TPM device is doing. So we don't need specific entries for this device in memmap/irqmap. I will give it a try. Thanks, Shameer.