From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:505:840c:b0:1be9:327d:8ee3 with SMTP id lq12csp125216njc; Wed, 12 Mar 2025 02:45:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsoRDgKud+eyChbJ8219Sy/tAsgYKwBMwTvJJlHAVoZKFfu7R9rztYdXY5RTcAdFTTSBOieX2KwjRZXQ==@linaro.org X-Google-Smtp-Source: AGHT+IEsTlwIZuKl/P10yenh5ShNeQ5aSpbqpwQNjEALFfGTqXREqm5zJSk7olqlAQescbsRIdUc X-Received: by 2002:a05:6214:250e:b0:6d8:9872:adc1 with SMTP id 6a1803df08f44-6e900693d5cmr322789756d6.38.1741772727365; Wed, 12 Mar 2025 02:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741772727; cv=none; d=google.com; s=arc-20240605; b=TxRPxxMTnMJTXpHnz/eUqlEPcUqmnSnrH1R0Ux3ANOBbRG+bZaLBCliMqFxyoCM4hJ bTrjQqC8lBWBSQeniitWThM5l60f0tSxuCbsxTNmR0GZKrend4SVj+iCVx2PEnIZWDRH 0UoyWv6778ow/JGFCCBh3jLKDwNyWFqnHQZSMmVzM3H/hAcNE0eTbhAvAOBID5N3yk9y vjWm1cBfnevmlGTg0SEz0roD4h5QzseqnYSyB/RTBaY8rBZNwgx9bCkCeyiIFjHhNtQc Ho/0O7/QMGhtyTlDHrhnrI0Of70HqlJ9/RMBTZ5DO2mIkexdQsNy+EX/MuIKSKSxrZZe 393w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:from:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to; bh=myOMIANLQzL0/B6/OvP+O0sDHSvrZZpJGi5COo6NSpM=; fh=L5k2mRSqinh8rv+X+K9B0cKsw7VXHEq5HuwmzaH9KTE=; b=c51984yKMOP7bT4YRzeztVaGmDUSYMkeo27FeqrazWDHq5n5ctyG3Z2zc0AdWrEEoT Py1vBWWnTQ+oQQ4G5+7EUviH21Y1Qt0BMdyP3bluGRjpLP52r0yIL2MbeVohlbtzhTCK hCdjySVNKQ278MfOAzsMh/leygVu3wgsIkrKAH7cB5nVnc4UgYJAfKwpc36bQDr+uTOg 3CCJCVCxFcWknegMebCSMBrT/ai7HS5Fs9YJkjXfjcAC2ObUZXdWLD2xExU6Y9PxpTis l0Bz3CKskYZ+j0dWJjgVdZHVDA3aZpDyO/Ywp5DsC3nrUZ8RTVVRt4hUsn/sC3enI1H0 2GNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e91b23ad93si60821196d6.249.2025.03.12.02.45.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Mar 2025 02:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org 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+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: o4vMicwW8HL2 > -----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