From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 977B5C28B28 for ; Wed, 12 Mar 2025 09:45:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tsIdz-0002Kf-AF; Wed, 12 Mar 2025 05:44:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tsIdd-0002EF-BT; Wed, 12 Mar 2025 05:44:33 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tsIda-0001mR-Bo; Wed, 12 Mar 2025 05:44:33 -0400 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZCQcY55pYz6J7qk; Wed, 12 Mar 2025 17:41:17 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id C1CF01400DC; Wed, 12 Mar 2025 17:44:25 +0800 (CST) Received: from frapeml500008.china.huawei.com (7.182.85.71) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 12 Mar 2025 10:44:25 +0100 Received: from frapeml500008.china.huawei.com ([7.182.85.71]) by frapeml500008.china.huawei.com ([7.182.85.71]) with mapi id 15.01.2507.039; Wed, 12 Mar 2025 10:44:25 +0100 To: Nicolin Chen 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 , "Wangzhou (B)" , jiangkunkun , Jonathan Cameron , "zhangfei.gao@linaro.org" Subject: RE: [RFC PATCH v2 04/20] hw/arm/virt: Add support for smmuv3-accel Thread-Topic: [RFC PATCH v2 04/20] hw/arm/virt: Add support for smmuv3-accel Thread-Index: AQHbko+d7BBFIVL5UECoP8opJSgSfrNuUN8AgADwK9A= Date: Wed, 12 Mar 2025 09:44:25 +0000 Message-ID: <4fb8ece9c1614c249dd5aa0bb8fe147b@huawei.com> References: <20250311141045.66620-1-shameerali.kolothum.thodi@huawei.com> <20250311141045.66620-5-shameerali.kolothum.thodi@huawei.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.48.146.174] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=185.176.79.56; envelope-from=shameerali.kolothum.thodi@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Shameerali Kolothum Thodi From: Shameerali Kolothum Thodi via Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org > -----Original Message----- > From: Nicolin Chen > Sent: Tuesday, March 11, 2025 8:23 PM > To: Shameerali Kolothum Thodi > 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 > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei.gao@linaro.org > Subject: Re: [RFC PATCH v2 04/20] hw/arm/virt: Add support for smmuv3- > accel >=20 > On Tue, Mar 11, 2025 at 02:10:29PM +0000, Shameer Kolothum wrote: > > Allow cold-plug smmuv3-accel to virt If the machine wide smmuv3 > > is not specified. > > > > No FDT support is added for now. > > > > Signed-off-by: Shameer Kolothum > > > --- > > hw/arm/virt.c | 12 ++++++++++++ > > hw/core/sysbus-fdt.c | 1 + > > include/hw/arm/virt.h | 1 + > > 3 files changed, 14 insertions(+) > > > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > > index 4a5a9666e9..84a323da55 100644 > > --- a/hw/arm/virt.c > > +++ b/hw/arm/virt.c > > @@ -73,6 +73,7 @@ > > #include "qobject/qlist.h" > > #include "standard-headers/linux/input.h" > > #include "hw/arm/smmuv3.h" > > +#include "hw/arm/smmuv3-accel.h" >=20 > smmuv3-accel.h included smmuv3.h in the patch prior. >=20 > > @@ -2911,6 +2912,16 @@ static void > virt_machine_device_plug_cb(HotplugHandler *hotplug_dev, > > platform_bus_link_device(PLATFORM_BUS_DEVICE(vms- > >platform_bus_dev), > > SYS_BUS_DEVICE(dev)); > > } > > + if (object_dynamic_cast(OBJECT(dev), TYPE_ARM_SMMUV3_ACCEL)) > { > > + if (vms->iommu =3D=3D VIRT_IOMMU_SMMUV3) { > > + error_setg(errp, > > + "iommu=3Dsmmuv3 is already specified. can't= create > smmuv3-accel dev"); > > + return; > > + } > > + if (vms->iommu !=3D VIRT_IOMMU_SMMUV3_ACCEL) { > > + vms->iommu =3D VIRT_IOMMU_SMMUV3_ACCEL; > > + } >=20 > Looks like it is to support TYPE_VIRTIO_IOMMU_PCI? > > Just asking: should SMMUV3_ACCEL work with that? Hmm..That's true. It will conflict with virtio-iommu. I will add a blocker if both are specified. Thanks, Shameer