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 1F27DFED2EB for ; Thu, 12 Mar 2026 08:38:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0bY2-0004FE-2z; Thu, 12 Mar 2026 04:37:38 -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 1w0bY0-0004Ef-N5 for qemu-arm@nongnu.org; Thu, 12 Mar 2026 04:37:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0bXy-0003hw-6P for qemu-arm@nongnu.org; Thu, 12 Mar 2026 04:37:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773304652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ow7VtfOE/wh9ARTRvSKmiEoOMuB7btyG82ANPQHN5FA=; b=C107MucV2FBsNsW4i1t/XIDeN0LuawYZsDrjR55/RaH0EP0eW5/Pm/VtWdvsKrei1ht7Kb pjtX9f8VhhqanrNG9ovRnDWpzaZK37y4uTbN5zoTrMeAUGt2ilv5xrc/KQPshyghGRrXxw clsedaE3cnd7hYmQiV8gNySc2vjhAZY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-iRN64LxNM1ij7Pw5jLsJhQ-1; Thu, 12 Mar 2026 04:37:29 -0400 X-MC-Unique: iRN64LxNM1ij7Pw5jLsJhQ-1 X-Mimecast-MFC-AGG-ID: iRN64LxNM1ij7Pw5jLsJhQ_1773304648 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4837bfcfe0dso8490325e9.1 for ; Thu, 12 Mar 2026 01:37:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773304648; x=1773909448; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ow7VtfOE/wh9ARTRvSKmiEoOMuB7btyG82ANPQHN5FA=; b=PUcc+hXK/eVJv28TwE3lRuyaOQw9SUKrxnaN8iOtFT/fcW7ILV3aeQIn4LPkSDDnmA lx8huy0lRP8FqYwlrO8xtrU0qOGZySQ6GIqhF5MsLyFgGVZOAi7kMy3GvK0+cmnhHsmO eoAWkSqf2bCV6aRuikTVSSMWbjy9DnHw4hZaVeHNNY7aWGr8C2KpPD0AUlneyBU63mUK Q20HdCtqd3hj43LVlYoIChVrWC4sqraaYrojXtdd03LwEdfO4Snh2eMYvTXmtLGFaDKr y/scyq6sJize4I/L7YYjRCleBtPnI07Za9kQ3FExJV5z9aHPuLdG3T57uyRWYmD7bZBy ukXg== X-Forwarded-Encrypted: i=1; AJvYcCVqxWnRfVU7tXFxlD+XsQmq7SnMxBpLtVVOifF2kqAOle3NWV070zQsftV4V+h3tQ57dJ1HcUtCDQ==@nongnu.org X-Gm-Message-State: AOJu0Yw9riPGPVcRW4bMY0CgazEyHGyhYb7FmHKgmq1G9d/UZp9cRE52 u8XMjhTKkU54/9HoIfucqu+vsUQ4bxrmP6gpOWVqMytZwTvp5xr/lMR95gR7yCrxTNhcl8kqmxW WTzae2Vt6EWtYTI7/ykuTsB36v6M1POt73wFiCfr2bi7VRMeo+8Kmyw== X-Gm-Gg: ATEYQzwtZppZWGyMi9e1trjPdsEL9Q72kzpCx7yN9vAcRHbh2HkM9Ke7MvK0OCEyUSJ ViwhOW7VF4GZEsamUZ9zhHv46nPHDht/eUXkWPaGk2k0M7m4gwFR7nWlEZId1W96s1fgiXrcoJQ piJz3WlbW3kwt3o7sdiDwLwcaUVq2cEYKmS2XS9i5KSg3xvnoT2Rn5cmruhmUOaT/roY0N1pl66 RBbHXm4f0ew6m2Xa9az+SUyYmtjYv1tn1GIHlgUY0lX/IxyIhSf1AZQqeVq//LL4UHropQyK/tq QNRliLKBXNcgfMIwLOGkd1Ug899iRZ89jMwBF0CRkKn+VCnuPv+On3y2nQbvUyecvXu9V+mM7p2 JlrDPtZQHARmJsm/OL9CfF5Tl7+oPkNJQNe8J7OMCQiK88jrlulquugs/YLwM X-Received: by 2002:a05:600c:608c:b0:485:34b3:8589 with SMTP id 5b1f17b1804b1-4854b136ae3mr88341625e9.31.1773304648291; Thu, 12 Mar 2026 01:37:28 -0700 (PDT) X-Received: by 2002:a05:600c:608c:b0:485:34b3:8589 with SMTP id 5b1f17b1804b1-4854b136ae3mr88341315e9.31.1773304647816; Thu, 12 Mar 2026 01:37:27 -0700 (PDT) Received: from ?IPV6:2a01:e0a:280:24f0:9db0:474c:ff43:9f5c? ([2a01:e0a:280:24f0:9db0:474c:ff43:9f5c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854b0c3878sm39523925e9.16.2026.03.12.01.37.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Mar 2026 01:37:27 -0700 (PDT) Message-ID: <6c8e31fd-e67f-4cfc-a6de-9268c668f061@redhat.com> Date: Thu, 12 Mar 2026 09:37:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 1/8] hw/arm/smmuv3-accel: Add helper for resolving auto parameters To: Shameer Kolothum Thodi , Nathan Chen , "qemu-devel@nongnu.org" , "qemu-arm@nongnu.org" Cc: Yi Liu , Eric Auger , Zhenzhong Duan , Peter Maydell , Shannon Zhao , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , Paolo Bonzini , =?UTF-8?Q?Daniel_P_=2E_Berrang=C3=A9?= , Alex Williamson , Eric Blake , Markus Armbruster References: <20260309192119.870186-1-nathanc@nvidia.com> <20260309192119.870186-2-nathanc@nvidia.com> From: =?UTF-8?Q?C=C3=A9dric_Le_Goater?= Autocrypt: addr=clg@redhat.com; keydata= xsFNBFu8o3UBEADP+oJVJaWm5vzZa/iLgpBAuzxSmNYhURZH+guITvSySk30YWfLYGBWQgeo 8NzNXBY3cH7JX3/a0jzmhDc0U61qFxVgrPqs1PQOjp7yRSFuDAnjtRqNvWkvlnRWLFq4+U5t yzYe4SFMjFb6Oc0xkQmaK2flmiJNnnxPttYwKBPd98WfXMmjwAv7QfwW+OL3VlTPADgzkcqj 53bfZ4VblAQrq6Ctbtu7JuUGAxSIL3XqeQlAwwLTfFGrmpY7MroE7n9Rl+hy/kuIrb/TO8n0 ZxYXvvhT7OmRKvbYuc5Jze6o7op/bJHlufY+AquYQ4dPxjPPVUT/DLiUYJ3oVBWFYNbzfOrV RxEwNuRbycttMiZWxgflsQoHF06q/2l4ttS3zsV4TDZudMq0TbCH/uJFPFsbHUN91qwwaN/+ gy1j7o6aWMz+Ib3O9dK2M/j/O/Ube95mdCqN4N/uSnDlca3YDEWrV9jO1mUS/ndOkjxa34ia 70FjwiSQAsyIwqbRO3CGmiOJqDa9qNvd2TJgAaS2WCw/TlBALjVQ7AyoPEoBPj31K74Wc4GS Rm+FSch32ei61yFu6ACdZ12i5Edt+To+hkElzjt6db/UgRUeKfzlMB7PodK7o8NBD8outJGS tsL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oPn9qrDJgsgcbBVc1gkUT6hnxShKPp4PlsZVMNjvPAnr5TEBgHkk54HQRhhwcYv1T2QumQ izDiU6iOrUzBThaMhZO3i927SG2DwWDVzZltKrCMD1aMPvb3NU8FOYRhNmIFR3fcalYr+9gD uVKe8BVz4atMOoktmt0GWTOC8P4= In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wvUJJ6km4vPeXfufM1vvdT__twjVmoJ9UlM5GYyD940_1773304648 X-Mimecast-Originator: redhat.com Content-Language: en-US, fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Hello Shameer On 3/10/26 09:40, Shameer Kolothum Thodi wrote: > > >> -----Original Message----- >> From: Cédric Le Goater >> Sent: 10 March 2026 07:42 >> To: Nathan Chen ; qemu-devel@nongnu.org; qemu- >> arm@nongnu.org >> Cc: Yi Liu ; Eric Auger ; >> Zhenzhong Duan ; Peter Maydell >> ; Shannon Zhao ; >> Michael S . Tsirkin ; Igor Mammedov >> ; Ani Sinha ; Paolo >> Bonzini ; Daniel P . Berrangé >> ; Alex Williamson ; Eric Blake >> ; Markus Armbruster ; >> Shameer Kolothum Thodi >> Subject: Re: [RFC PATCH 1/8] hw/arm/smmuv3-accel: Add helper for resolving >> auto parameters >> >> External email: Use caution opening links or attachments >> >> >> On 3/9/26 20:21, Nathan Chen wrote: >>> From: Nathan Chen >>> >>> Introduce smmuv3_accel_auto_finalise() to resolve properties >>> that are set to 'auto' for accelerated SMMUv3. This helper >>> function allows properties such as ATS, RIL, SSIDSIZE, and OAS >>> support to be resolved from host IOMMU values, while avoiding >>> triggering auto-resolved values for hot-plugged devices. >>> >>> Auto mode requires at least one cold-plugged device to retrieve >>> and finalise these properties, and we fail boot if that is not >>> the case. >> >> IIUC, QEMU will require a minimum of one PCI device if >> arm-smmuv3,accel=on is passed on the command line and if the >> smmu properties are set to 'auto'. > > Yes, that’s correct. > >> I would try to enforce this requirement in the realize routine. >> Can't we leverage the supports_address_space() handler ? See : >> >> >> static bool smmuv3_accel_supports_as(PCIBus *bus, void *opaque, int >> devfn, >> Error **errp) >> { >> PCIDevice *pdev = pci_find_device(bus, pci_bus_num(bus), devfn); >> bool vfio_pci = false; >> >> if (pdev && !smmuv3_accel_pdev_allowed(pdev, &vfio_pci)) { >> if (vfio_pci) { >> error_setg(errp, "vfio-pci endpoint devices without an iommufd " >> "backend not allowed when using arm-smmuv3,accel=on"); >> ... > Hmm..i doubt we can do it here as we need HostIOMMUDeviceIOMMUFD *idev > for retrieving the IOMMU_GET_HW_INFO. > > supports_address_space() is invoked very early during do_pci_register_device() > and there are no associated idev available at that time. yes. Have your considered adding an 'iommufd' property to smmuv3 instead ? I think this should solve a lot of potential issues and would be more model friendly. Sorry if that was proposed already. I have been through all the emails. > >>> >>> Subsequent patches will make use of this helper to set the >>> values when we convert the values to OnOffAuto. New auto_mode >>> and auto_finalised bool members are added to SMMUv3AccelState. >>> smmuv3_accel_init() will set auto_mode to true when 'auto' is >>> detected for the accel SMMUv3 properties. >>> smmuv3_accel_auto_finalise() will set auto_finalised to true >>> after all 'auto' properties are resolved, and subsequent >>> calls to this function will return early if auto_finalised is >>> set to true. >>> >>> Suggested-by: Shameer Kolothum >>> Signed-off-by: Nathan Chen >>> --- >>> hw/arm/smmuv3-accel.c | 38 +++++++++++++++++++++++++++++++++----- >>> hw/arm/smmuv3-accel.h | 2 ++ >>> 2 files changed, 35 insertions(+), 5 deletions(-) >>> >>> diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c >>> index 17306cd04b..617629bacd 100644 >>> --- a/hw/arm/smmuv3-accel.c >>> +++ b/hw/arm/smmuv3-accel.c >>> @@ -35,11 +35,34 @@ static int smmuv3_oas_bits(uint32_t oas) >>> return map[oas]; >>> } >>> >>> +static void smmuv3_accel_auto_finalise(SMMUv3State *s, PCIDevice >> *pdev, >>> + struct iommu_hw_info_arm_smmuv3 *info) { >>> + SMMUv3AccelState *accel = s->s_accel; >>> + >>> + /* Return if no auto for any or finalised already */ >>> + if (!accel->auto_mode || accel->auto_finalised) { >>> + return; >>> + } >>> + >>> + /* We can't update if device is hotplugged */ >>> + if (DEVICE(pdev)->hotplugged) { >>> + warn_report("arm-smmuv3: 'auto' feature property detected, but host >> " >>> + "value cannot be applied for hot-plugged device; using " >>> + "existing value"); >> >> Please add an 'Error **' parameter instead. >> >>> + return; >>> + } >>> + >>> + accel->auto_finalised = true; >>> +} >>> + >>> static bool >>> smmuv3_accel_check_hw_compatible(SMMUv3State *s, >>> struct iommu_hw_info_arm_smmuv3 *info, >>> + PCIDevice *pdev, >>> Error **errp) >>> { >>> + smmuv3_accel_auto_finalise(s, pdev, info); >>> + >>> /* QEMU SMMUv3 supports both linear and 2-level stream tables */ >>> if (FIELD_EX32(info->idr[0], IDR0, STLEVEL) != >>> FIELD_EX32(s->idr[0], IDR0, STLEVEL)) { >>> @@ -124,7 +147,7 @@ >> smmuv3_accel_check_hw_compatible(SMMUv3State *s, >>> >>> static bool >>> smmuv3_accel_hw_compatible(SMMUv3State *s, >> HostIOMMUDeviceIOMMUFD *idev, >>> - Error **errp) >>> + PCIDevice *pdev, Error **errp) >>> { >>> struct iommu_hw_info_arm_smmuv3 info; >>> uint32_t data_type; >>> @@ -142,7 +165,7 @@ smmuv3_accel_hw_compatible(SMMUv3State *s, >> HostIOMMUDeviceIOMMUFD *idev, >>> return false; >>> } >>> >>> - if (!smmuv3_accel_check_hw_compatible(s, &info, errp)) { >>> + if (!smmuv3_accel_check_hw_compatible(s, &info, pdev, errp)) { >>> return false; >>> } >>> return true; >>> @@ -595,6 +618,7 @@ static bool >> smmuv3_accel_set_iommu_device(PCIBus *bus, void *opaque, int devfn, >>> SMMUv3State *s = ARM_SMMUV3(bs); >>> SMMUPciBus *sbus = smmu_get_sbus(bs, bus); >>> SMMUv3AccelDevice *accel_dev = smmuv3_accel_get_dev(bs, sbus, >> bus, devfn); >>> + PCIDevice *pdev = pci_find_device(bus, pci_bus_num(bus), devfn); >>> >>> if (!idev) { >>> return true; >>> @@ -613,7 +637,7 @@ static bool >> smmuv3_accel_set_iommu_device(PCIBus *bus, void *opaque, int devfn, >>> * Check the host SMMUv3 associated with the dev is compatible with >> the >>> * QEMU SMMUv3 accel. >>> */ >>> - if (!smmuv3_accel_hw_compatible(s, idev, errp)) { >>> + if (!smmuv3_accel_hw_compatible(s, idev, pdev, errp)) { >>> return false; >>> } >>> >>> @@ -867,8 +891,12 @@ bool >> smmuv3_accel_attach_gbpa_hwpt(SMMUv3State *s, Error **errp) >>> >>> void smmuv3_accel_reset(SMMUv3State *s) >>> { >>> - /* Attach a HWPT based on GBPA reset value */ >>> - smmuv3_accel_attach_gbpa_hwpt(s, NULL); >>> + if (s->s_accel && s->s_accel->auto_mode && !s->s_accel- >>> auto_finalised) { >>> + error_report("AUTO mode specified but properties not finalised."); >> >> This is not a very friendly message for the user. >> >> >>> + exit(1); >> >> QEMU should not exit in the reset phase. Can this check be done during >> the realize stage ? > > SMMUv3 realize stage happens before the cold-plugged device > set_iommu_device(), and therefore we can't check whether the SMMUv3 > properties have been retrieved and finalised at that point. > > Not sure there is any other place we can do this other than in the reset > path. > > Is avoiding exit(1) in the reset phase a strict requirement or a nice to > have one? reset is a runtime handler called at each reboot. One should not exit. We should try to verify that the conditions to run the machine are correct before reaching the reset phase. Thanks, C.