From: Shameerali Kolothum Thodi via <qemu-arm@nongnu.org>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"eric.auger@redhat.com" <eric.auger@redhat.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"ddutile@redhat.com" <ddutile@redhat.com>,
"berrange@redhat.com" <berrange@redhat.com>,
"nathanc@nvidia.com" <nathanc@nvidia.com>,
"mochs@nvidia.com" <mochs@nvidia.com>,
"smostafa@google.com" <smostafa@google.com>,
Linuxarm <linuxarm@huawei.com>,
"Wangzhou (B)" <wangzhou1@hisilicon.com>,
jiangkunkun <jiangkunkun@huawei.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>
Subject: RE: [PATCH 1/5] hw/arm/smmuv3: Introduce SMMUv3 device
Date: Wed, 16 Apr 2025 05:32:36 +0000 [thread overview]
Message-ID: <5de48a047d6b4076b033cbe4fa10a803@huawei.com> (raw)
In-Reply-To: <Z/8m8cFLY1vEjHpA@Asurada-Nvidia>
> -----Original Message-----
> From: Nicolin Chen <nicolinc@nvidia.com>
> Sent: Wednesday, April 16, 2025 4:42 AM
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: qemu-arm@nongnu.org; qemu-devel@nongnu.org;
> eric.auger@redhat.com; peter.maydell@linaro.org; jgg@nvidia.com;
> ddutile@redhat.com; berrange@redhat.com; nathanc@nvidia.com;
> mochs@nvidia.com; smostafa@google.com; Linuxarm
> <linuxarm@huawei.com>; Wangzhou (B) <wangzhou1@hisilicon.com>;
> jiangkunkun <jiangkunkun@huawei.com>; Jonathan Cameron
> <jonathan.cameron@huawei.com>; zhangfei.gao@linaro.org
> Subject: Re: [PATCH 1/5] hw/arm/smmuv3: Introduce SMMUv3 device
>
> On Tue, Apr 15, 2025 at 09:11:00AM +0100, Shameer Kolothum wrote:
> > +static int smmuv3_dev_pcie_bus(Object *obj, void *opaque)
> > +{
> > + DeviceState *d = opaque;
> > + PCIBus *bus;
> > +
> > + if (!object_dynamic_cast(obj, TYPE_PCI_HOST_BRIDGE)) {
> > + return 0;
> > + }
> > +
> > + bus = PCI_HOST_BRIDGE(obj)->bus;
> > + if (d->parent_bus && !strcmp(bus->qbus.name, d->parent_bus-
> >name)) {
> > + object_property_set_link(OBJECT(d), "primary-bus", OBJECT(bus),
> > + &error_abort);
> > + return 1;
>
> Return 1 would break the caller's foreach. And I guess that's what
> we want since "primary-bus" should only be set once?
Yes. It will only set once and once you get it no need to iterate again.
>
> Maybe better to add a line of comments to explain that a bit?
Ok.
>
> > + }
> > + return 0;
> > +}
> > +
> > +static void smmuv3_dev_realize(DeviceState *d, Error **errp)
> > +{
> > + SMMUv3DevState *s_nested = ARM_SMMUV3_DEV(d);
> > + SMMUv3DevClass *c = ARM_SMMUV3_DEV_GET_CLASS(s_nested);
>
Oops...that's probably from a prototype code I had earlier!.
Thanks,
Shameer
WARNING: multiple messages have this Message-ID (diff)
From: Shameerali Kolothum Thodi via <qemu-devel@nongnu.org>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"eric.auger@redhat.com" <eric.auger@redhat.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"ddutile@redhat.com" <ddutile@redhat.com>,
"berrange@redhat.com" <berrange@redhat.com>,
"nathanc@nvidia.com" <nathanc@nvidia.com>,
"mochs@nvidia.com" <mochs@nvidia.com>,
"smostafa@google.com" <smostafa@google.com>,
Linuxarm <linuxarm@huawei.com>,
"Wangzhou (B)" <wangzhou1@hisilicon.com>,
jiangkunkun <jiangkunkun@huawei.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>
Subject: RE: [PATCH 1/5] hw/arm/smmuv3: Introduce SMMUv3 device
Date: Wed, 16 Apr 2025 05:32:36 +0000 [thread overview]
Message-ID: <5de48a047d6b4076b033cbe4fa10a803@huawei.com> (raw)
In-Reply-To: <Z/8m8cFLY1vEjHpA@Asurada-Nvidia>
> -----Original Message-----
> From: Nicolin Chen <nicolinc@nvidia.com>
> Sent: Wednesday, April 16, 2025 4:42 AM
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: qemu-arm@nongnu.org; qemu-devel@nongnu.org;
> eric.auger@redhat.com; peter.maydell@linaro.org; jgg@nvidia.com;
> ddutile@redhat.com; berrange@redhat.com; nathanc@nvidia.com;
> mochs@nvidia.com; smostafa@google.com; Linuxarm
> <linuxarm@huawei.com>; Wangzhou (B) <wangzhou1@hisilicon.com>;
> jiangkunkun <jiangkunkun@huawei.com>; Jonathan Cameron
> <jonathan.cameron@huawei.com>; zhangfei.gao@linaro.org
> Subject: Re: [PATCH 1/5] hw/arm/smmuv3: Introduce SMMUv3 device
>
> On Tue, Apr 15, 2025 at 09:11:00AM +0100, Shameer Kolothum wrote:
> > +static int smmuv3_dev_pcie_bus(Object *obj, void *opaque)
> > +{
> > + DeviceState *d = opaque;
> > + PCIBus *bus;
> > +
> > + if (!object_dynamic_cast(obj, TYPE_PCI_HOST_BRIDGE)) {
> > + return 0;
> > + }
> > +
> > + bus = PCI_HOST_BRIDGE(obj)->bus;
> > + if (d->parent_bus && !strcmp(bus->qbus.name, d->parent_bus-
> >name)) {
> > + object_property_set_link(OBJECT(d), "primary-bus", OBJECT(bus),
> > + &error_abort);
> > + return 1;
>
> Return 1 would break the caller's foreach. And I guess that's what
> we want since "primary-bus" should only be set once?
Yes. It will only set once and once you get it no need to iterate again.
>
> Maybe better to add a line of comments to explain that a bit?
Ok.
>
> > + }
> > + return 0;
> > +}
> > +
> > +static void smmuv3_dev_realize(DeviceState *d, Error **errp)
> > +{
> > + SMMUv3DevState *s_nested = ARM_SMMUV3_DEV(d);
> > + SMMUv3DevClass *c = ARM_SMMUV3_DEV_GET_CLASS(s_nested);
>
Oops...that's probably from a prototype code I had earlier!.
Thanks,
Shameer
next prev parent reply other threads:[~2025-04-16 5:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 8:10 [PATCH 0/5] Add support for user creatable SMMUv3 device Shameer Kolothum via
2025-04-15 8:10 ` Shameer Kolothum via
2025-04-15 8:11 ` [PATCH 1/5] hw/arm/smmuv3: Introduce " Shameer Kolothum via
[not found] ` <Z/8m8cFLY1vEjHpA@Asurada-Nvidia>
2025-04-16 5:32 ` Shameerali Kolothum Thodi via [this message]
2025-04-16 5:32 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 2/5] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices Shameer Kolothum via
[not found] ` <Z/8vzf/q24sZOdBG@Asurada-Nvidia>
2025-04-16 5:38 ` Shameerali Kolothum Thodi via
2025-04-16 5:38 ` Shameerali Kolothum Thodi via
2025-04-18 20:34 ` Donald Dutile
2025-04-22 8:43 ` Shameerali Kolothum Thodi via
2025-04-22 8:43 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 3/5] hw/arm/virt: Factor out common SMMUV3 dt bindings code Shameer Kolothum via
[not found] ` <Z/8xSljew92Hhh99@Asurada-Nvidia>
2025-04-16 5:54 ` Shameerali Kolothum Thodi via
2025-04-16 5:54 ` Shameerali Kolothum Thodi via
2025-04-15 8:11 ` [PATCH 4/5] hw/arm/virt: Add support for smmuv3 device Shameer Kolothum via
2025-04-15 8:11 ` Shameer Kolothum via
2025-04-15 9:25 ` Jonathan Cameron via
2025-04-15 9:25 ` Jonathan Cameron via
2025-04-15 9:28 ` Shameerali Kolothum Thodi via
2025-04-15 9:28 ` Shameerali Kolothum Thodi via
2025-04-15 9:30 ` Daniel P. Berrangé
2025-04-15 8:11 ` [PATCH 5/5] hw/arm/smmuv3: Enable smmuv3 device creation Shameer Kolothum via
2025-04-15 8:11 ` Shameer Kolothum via
2025-04-18 20:34 ` [PATCH 0/5] Add support for user creatable SMMUv3 device Donald Dutile
2025-04-22 8:57 ` Shameerali Kolothum Thodi via
2025-04-22 8:57 ` Shameerali Kolothum Thodi via
2025-04-28 18:41 ` Donald Dutile
2025-04-30 17:47 ` Eric Auger
2025-05-01 9:37 ` Shameerali Kolothum Thodi via
2025-05-01 9:37 ` Shameerali Kolothum Thodi via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5de48a047d6b4076b033cbe4fa10a803@huawei.com \
--to=qemu-arm@nongnu.org \
--cc=berrange@redhat.com \
--cc=ddutile@redhat.com \
--cc=eric.auger@redhat.com \
--cc=jgg@nvidia.com \
--cc=jiangkunkun@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linuxarm@huawei.com \
--cc=mochs@nvidia.com \
--cc=nathanc@nvidia.com \
--cc=nicolinc@nvidia.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=smostafa@google.com \
--cc=wangzhou1@hisilicon.com \
--cc=zhangfei.gao@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.