> -----Original Message----- > From: Nicolin Chen <nicol...@nvidia.com> > Sent: Wednesday, April 16, 2025 5:26 AM > To: Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com> > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvidia.com; > mo...@nvidia.com; smost...@google.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: [PATCH 3/5] hw/arm/virt: Factor out common SMMUV3 dt > bindings code > > On Tue, Apr 15, 2025 at 09:11:02AM +0100, Shameer Kolothum wrote: > > No functional changes intended. This will be useful when we add > > support for user-creatable smmuv3 device. > > > > Signed-off-by: Shameer Kolothum > <shameerali.kolothum.th...@huawei.com> > > --- > > hw/arm/virt.c | 55 > > +++++++++++++++++++++++++++------------------------ > > 1 file changed, 29 insertions(+), 26 deletions(-) > > > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c index > > a96452f17a..729f192558 100644 > > --- a/hw/arm/virt.c > > +++ b/hw/arm/virt.c > > @@ -1417,19 +1417,42 @@ static void create_pcie_irq_map(const > MachineState *ms, > > 0x7 /* PCI irq */); > > } > > > > +static void create_smmuv3_dt_bindings(const VirtMachineState *vms, > hwaddr base, > > + int irq) { > > + char *node; > > + const char compat[] = "arm,smmu-v3"; > > + const char irq_names[] = "eventq\0priq\0cmdq-sync\0gerror"; > > + MachineState *ms = MACHINE(vms); > > + > > + node = g_strdup_printf("/smmuv3@%" PRIx64, base); > > + qemu_fdt_add_subnode(ms->fdt, node); > > + qemu_fdt_setprop(ms->fdt, node, "compatible", compat, > sizeof(compat)); > > + qemu_fdt_setprop_sized_cells(ms->fdt, node, "reg", 2, base, 2, > > + 0x20000); > > Nit: I would pass in the size from its caller, just to ease in the future when > we need to add an instance supporting a different MMIO range. Yes, that makes sense. And probably will use #define for the current size. Thanks, Shameer
RE: [PATCH 3/5] hw/arm/virt: Factor out common SMMUV3 dt bindings code
Shameerali Kolothum Thodi via Tue, 15 Apr 2025 22:55:11 -0700
- [PATCH 0/5] Add support for user creatable S... Shameer Kolothum via
- [PATCH 3/5] hw/arm/virt: Factor out com... Shameer Kolothum via
- RE: [PATCH 3/5] hw/arm/virt: Factor... Shameerali Kolothum Thodi via
- [PATCH 1/5] hw/arm/smmuv3: Introduce SM... Shameer Kolothum via
- RE: [PATCH 1/5] hw/arm/smmuv3: Intr... Shameerali Kolothum Thodi via
- [PATCH 2/5] hw/arm/virt-acpi-build: Upd... Shameer Kolothum via
- RE: [PATCH 2/5] hw/arm/virt-acpi-bu... Shameerali Kolothum Thodi via
- Re: [PATCH 2/5] hw/arm/virt-acp... Donald Dutile
- RE: [PATCH 2/5] hw/arm/virt... Shameerali Kolothum Thodi via
- [PATCH 5/5] hw/arm/smmuv3: Enable smmuv... Shameer Kolothum via
- [PATCH 4/5] hw/arm/virt: Add support fo... Shameer Kolothum via
- Re: [PATCH 4/5] hw/arm/virt: Add su... Jonathan Cameron via
- Re: [PATCH 4/5] hw/arm/virt: Ad... Daniel P . Berrangé