[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 09/13] arm/smmu-v3: add suspend/resume handlers
- To: Mykola Kvach <xakep.amatop@xxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Sat, 9 May 2026 07:50:40 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=gmail.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eXvam/YZ/eDqHqEp8ToiSa3PuFcnOSmoOOyUdP1mmPQ=; b=gCs1D5d2Vvcd9p8Yo3bWh+lhSIAcYzLoJHxKW/a8szsplyJJ+RKRS2ziEnDSfbbHz6A2nSXWS56jFiUnXbVHecXdKug1V/Ca4nGFktO3VplzOPBxdXVMLG6Oh4CuIzK+ScHJJZmqRtlXW8ihJj0jtaXtuN+XtEPtAyJNXnugYtcbmyj1wbB6o7TgHpegIclEg32RmJL/nHxGwvfFZYeYCga+cYZ/oUzvxveIrINbAkBdLmrNDZ90NoNv5YsYs7+ZuzLXj8kx0gwOWCWS100kExFMg0oxVzMt9WpA6QPlQyYMSqVRf8aBgAbuWTuGLayW7QVRv9dTwaqyAzOW/WgNnA==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eXvam/YZ/eDqHqEp8ToiSa3PuFcnOSmoOOyUdP1mmPQ=; b=iIOw/zkH+SuONepFO6H2W2iDJ/eayEryKrSzVxOT6qmyybHJcCEoNgWWHtKj+Q/RhnUHRqF9+0lTHorWfBDZsGfMZJWiaylhVoLYdl514Wx/M8n/6kpxylpzSP2+ekoaukqixRR9W9BHDR/l9du1JmJjLrbNvdG2WxHWm5AXKgqh53evpzLHjg/MtdhGP0i7t0+nexsz9HZaU3qjDFeWkuhkkHWkm2PGSxUuywotPXEQ8mmM9kTKmh4XY5nn8pd7Cfh3NqA5WFFlqUgr/aIwwVKr9HzReFac8qwxCFxqUxzdRRuQ1r2BrEFVxOZVqF5H3xIc1TpFaoV9aaGQegNDwA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Ano/IT14zKw3kYobaN9+xaFoz2UA7WXHBl1DJAR3QqA5USPbHhhUuYt4Oa4VjZtpvcOp4VjcqGy+JO0OyoWajsB+lG1mIgJpMi0M67L/fGjL//AAzuwvqEOsXYVhw5i5mHR8T5HJM+lNOoUMEI3Isve+Z2tEWXxXcj1bsnGYTToqqKflN8CyVmQ/UScdxqHZQ+NQTS7SOggsALKb5xBCDGMfqH/RKpRL7SezQZhN7prKFu1Rp+qjQtama9dn/tLOrsdeCwBwP+MGOkUtSXyNDw3s3M+eyaRHY0DioEa2TkxyCq0WpuUUCTw0AcdHF2bpDNeG6xdBdSjmfcWz3vsaTg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kzZVAluTo+bshLr8lCzE4RyI2nPq5jKUkfsdgFP12PbW3DXsN1ycV/NvsJGGzYVteg2LA0NejjHdP5WmjoMpUOnxo3/00k3P0cU3M/vqH84o0lMtK5yQtkJCLvksGZR6bCpe/OlLw7SJU8TKv9xtvMw/LVat2pLAGKkUMb08ZjoiFBuZZBKJLA9fWnQ0Wf1SoRnCXkk3yhI1c5j9QOICIfajeWQst9pamSt/5jfrszM34XmAweNeWte/ZcxYwS2/jl3GbwfhP/Qkrz0SJ7yOVOsVUGjwW+8HvzkAJOIdPMUJ6XWOh560DfLMPUuFSnXXqgP4BIjuPUqECAG12R0UGA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Mykola Kvach <mykola_kvach@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Sat, 09 May 2026 07:51:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHc1k50BMsvUkAtf0yXvEOre8XAa7X/maIAgASD5YCAAJ2MAIAAqTsA
- Thread-topic: [PATCH v8 09/13] arm/smmu-v3: add suspend/resume handlers
Hi Mykola,
> On 8 May 2026, at 22:44, Mykola Kvach <xakep.amatop@xxxxxxxxx> wrote:
>
> On Fri, May 8, 2026 at 3:22 PM Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
>>
>> HI Mykola,
>>
>>>>>
>>>>> -static int __init arm_smmu_device_reset(struct arm_smmu_device *smmu)
>>>>> +static int arm_smmu_device_reset(struct arm_smmu_device *smmu)
>>>>> {
>>>>> int ret;
>>>>> u32 reg, enables;
>>>>> @@ -2163,17 +2166,9 @@ static int __init arm_smmu_device_reset(struct
>>>>> arm_smmu_device *smmu)
>>>>> }
>>>>> }
>>>>>
>>>>> - ret = arm_smmu_setup_irqs(smmu);
>>>>> - if (ret) {
>>>>> - dev_err(smmu->dev, "failed to setup irqs\n");
>>>>
>>>> We are moving this one to the probe and ..
>>>>
>>>>> + ret = arm_smmu_enable_irqs(smmu);
>>>>> + if ( ret )
>>>>
>>>> changing with this one, but arm_smmu_setup_irqs() also calls
>>>> arm_smmu_setup_unique_irqs() which
>>>> calls arm_smmu_setup_msis(), are we sure that on resume we will get the
>>>> same state?
>>>
>>> This follows the split introduced in the Linux arm-smmu-v3 runtime/system
>>> sleep
>>> series:
>>>
>>> https://lore.kernel.org/linux-iommu/20260414194702.1229094-1-praan@xxxxxxxxxx/
>>>
>>> The intent is to keep IRQ handler registration as one-time probe state,
>>> while
>>> reset/resume only restores the SMMU hardware state and re-enables interrupt
>>> generation.
>>>
>>> You are right that the MSI case needs extra care. In the Linux series this
>>> is
>>> handled by arm_smmu_resume_msis(), which restores the SMMU-side MSI
>>> configuration. I did not port that part in this patch because Xen SMMUv3 MSI
>>> support is currently documented as unsupported and is not part of the
>>> supported/tested path, so this patch only covers the wired IRQ path used by
>>> Xen
>>> today.
>>>
>>> If Xen SMMUv3 MSI support becomes usable in the future, the resume path will
>>> need an equivalent MSI restore step before IRQ_CTRL is re-enabled.
>>
>> In the mean time should we check maybe smmu->features doesn’t have
>> ARM_SMMU_FEAT_MSI flag and document it in commit message?
>>
>> What do you think about it? I’m just worried someone uses CONFIG_MSI and your
>> feature and ends up in some trouble, while we know that your feature breaks
>> CONFIG_MSI.
>
> Good point.
>
> I don't think checking only ARM_SMMU_FEAT_MSI in this patch is the right
> approach, since that reflects hardware capability rather than whether Xen is
> actually using the SMMUv3 MSI IRQ path.
Yes you are right, I realised that moments after sending my reply, a good check
would be to complain only if Xen is actually using that path.
Let’s go for documenting the limitation unless maintainers disagree.
Cheers,
Luca
|