[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: Fri, 8 May 2026 12:21:05 +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=wf0JaJBKE0RAKiGaPOhcJUVQ94p3+JHF0ZQ9XWx17YI=; b=XcDxs43iRJW9aOUTMK3N2nRFaxuBadxeqovSz5BHEgPNAVjbBqCZCBFeAoM1AQRI/eo+Okb2kGlKn6YgSDx6OQJ5w+r5SrYM7n8srdnM2K0hjCD0FaBhwV5Zu3Wy7i2qu7DhkFHcvNdbU050aWFL+odw8AFTLNpXfhNMTnaUZPcX0r4y+V64uiRh1t0xEhB16PwC/V7JxRP7s5w4ZYusRvsge6rOPbcWZUNrnVNX2IOwF5dgBIKwThco92hIPvuIO9A9eIXGBfWBtyvmN6U7s+ZB7Htt2B3znnBgYoqbSC0aFgdIV4yIyjT4lpBFvXDjnVOqsjmifS4S7quAspXZnQ==
- 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=wf0JaJBKE0RAKiGaPOhcJUVQ94p3+JHF0ZQ9XWx17YI=; b=T8ZuARX0ItsdeNiZZ+841/XWMe7O5Ohph8ZEctv76gWVjxfPFblwX3XhYeBDm7KRlX0ObLly4PGZlkjD4UcCZeBOk9ychP24S0Yauv9nLVSga2RR+K0MS9yIUAi5hgGPwUAlKKe1eQlGpTgD9RL1LtnXgLcWpcOoHD0IO4QO8lc2nborFyJm0V8St1DDyR23biL6J1Q4XqwE3szBmpmZNwx1CmoGXpYok0boJuCBeiaq51yMihgfDdZIflUtvmnY80eVoxbFa30LqUGuCjcTtclZAbdOnJJ9lMopNiOE8O85rtfo7EzFBrEXvkZ7ofButBmBLa3fQX9ez/RD2Uwluw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=wBfhKe/BXq7Pg65qnWeUwKpOf+nZtSWWIZuY5qQhPNTlihu00Z2yUubJEV2cbM51LeTX+0bUpnLB4q5EauS25DAX8UQsr4z2F74DjfAUgprKVQfnsHpnIQGg07X71aGDV/1zkmaVLLx/Q3+5eEfFuO6uC47uQP6hBVIAM4EgaaZp7fPEecGOO3L9UQLYFgXdxH6DuC0z6kwfe1ZkyimuZYpckCG7zn9z4bC0+MC/wWmrh61NSQX861lnM6sjCJPb7U8xL90gIhIRQVPlZZiSu8VrBKvyDEUcFNTlBZ1hmB1oJGXoKLGM/x7uBAtbAXQz3IHeUsPMLZgnAXoDlNdSVg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RSSO2CYNCSeqxo18qF7wjC+BQ+MRMKd8jMaRhfdwnPBZXlXwS4CsfjdPF16TWsYSdXhm43KzRuhWcaWLsxJjZ5ltIhNOn8kPyH+ijSCanOmstiACwJ0PpKJ3TzeeWk8OV38jkTCYATNh5ASCtSiDcHs6FL9HMsIQxlTj8QShsyNcmqYgTaxClyubnNqrC59UKPZh+qk3XRNbx5bxrK3xsWzaJNQNf4Jpld+3Nn9TyCdyYwLuKOdmtD9FPt2c6A4iT2OM1L0GD0lcLVydhOuIc8Zsg+mXALzeGzbYKKuOjxJvpwAgyV1bg73YejJYvEyMcqnSt8bksn1y/0Gd2eYbuQ==
- 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: Fri, 08 May 2026 12:22:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHc1k50BMsvUkAtf0yXvEOre8XAa7X/maIAgASD5YA=
- Thread-topic: [PATCH v8 09/13] arm/smmu-v3: add suspend/resume handlers
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.
Maybe the maintainers can give their opinion here as well.
Cheers,
Luca
|