Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp101546pxa; Fri, 31 Jul 2020 07:26:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEIeLTTsEpwtCuN3f/pBpzuAZOT7BhlSGYuIGX1mbCR/BQZBNzSsA2DqMb1lidikaPMRG8 X-Received: by 2002:a17:906:2451:: with SMTP id a17mr4207859ejb.274.1596205587854; Fri, 31 Jul 2020 07:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596205587; cv=none; d=google.com; s=arc-20160816; b=Dvfv79/nT9Ipuxww4gx/FuDKySdjK2mN0JvLv05P5BqoSaqvGS2CUUVx+NEFXydVLV bmnmnXyIlo8WiLWn9GmT/AXiaFqwJqV69VawmIluFj2WhlQI9tSkI2CXBNMkEMMRzvFC 1ktTPDUyhgtG00hLWbAFLeKDuZXgpJl5qDhNmVm2YOwt+ah8XufvZWMVPOvLf/57v82g Hb7h48evU/AOFoltGNmSraXtQ72N2ypd1tRmizJWPU+/rz5xlD5zY5ZRuUB7X+Y5pIhZ sv+7IDaDHo2bOAOtZ3CuIVo5KjmV+KhMyjo9VC92b/08koqPgXXZXxJ0Ns2fFXTqV8Mm S1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=LUq1ijDD9SyO2ufTXKPW9//vrm+uL0JQvV8OQ7tDtyA=; b=EEXchYy8HWn9wUugZ2fB5qWxk6hzAJmHGAwonN69nk9ugtqt0gzzbyCQNyd0wBTt3y leo07Ns0uiyFoGtPAr/XpqmELP/Kgxi75/AKZfqZzbEdnxKYfO/Cb92BSDSdiQ8eFcKt yLAJDe7LO9yLSA/1Ps+mJmN5eUloQIZOrdxBljd0Zyx6GzShLZyGpqC5ioAUgw9IXJsQ giq1jQaVOYEbzf32KAw1Wibla3+5QA+o0BlhxzQCB1j7o+tNU8+XwSeKSSkAw0q2I9lH pF7qC00DZqtUx1iqfh0q1Bz493n887r6htNNZHwHYRimVO3qzQzPFtCgMsJW2WXyKyK4 jwyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me17si5140483ejb.258.2020.07.31.07.26.06; Fri, 31 Jul 2020 07:26:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728965AbgGaOZZ (ORCPT + 99 others); Fri, 31 Jul 2020 10:25:25 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:37639 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728713AbgGaOZZ (ORCPT ); Fri, 31 Jul 2020 10:25:25 -0400 Received: by mail-oi1-f195.google.com with SMTP id e6so6627474oii.4; Fri, 31 Jul 2020 07:25:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LUq1ijDD9SyO2ufTXKPW9//vrm+uL0JQvV8OQ7tDtyA=; b=euny89LaKj/ti2o9A9iETv+dPKl7u/fbq7O0uhp3G4jRWPy2bhLjCCsj0j8ExW6UMQ H7u52fAfOLmEJP1TYyaXIyDsPptIjEQM6TNHWNcHfBQJEHQvi2BuBvwOY/oYdRdlWvV8 54MU9pUGegIj14pgoWSnpA7FCcLiE1TFsSj9ODoxWoLdZ21aWFp3l/41whzoYOfzwwf+ WmvJ0byILi3dqT+8S4BQS4L3Nl7SZF8B3PXcHLNu1h0bwY2TnWrhmL0oKRd7G/dMMVxp Iph+WUpF9ZmULJjI2WkVOciYmV9r20zlhfCiD/+F4x2Yp35o+g78jKzQLea3LK50i1m7 wRlw== X-Gm-Message-State: AOAM532Hd4NAG1/QXjDc4NI/VHEHG2+6ZYeeqYW0K+POuyP7CiPznUE9 ejxgQIZGMG3GlT2LDDMv+mUN/gHWJw1B2GwIiwc= X-Received: by 2002:aca:a88e:: with SMTP id r136mr3259373oie.110.1596205523967; Fri, 31 Jul 2020 07:25:23 -0700 (PDT) MIME-Version: 1.0 References: <20200717191009.GA3387@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <5464f384-d4b4-73f0-d39e-60ba9800d804@oracle.com> <20200721000348.GA19610@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <408d3ce9-2510-2950-d28d-fdfe8ee41a54@oracle.com> <20200722180229.GA32316@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <20200723225745.GB32316@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <66a9b838-70ed-0807-9260-f2c31343a081@oracle.com> <20200730230634.GA17221@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <53b577a3-6af9-5587-7e47-485be38b3653@oracle.com> In-Reply-To: <53b577a3-6af9-5587-7e47-485be38b3653@oracle.com> From: "Rafael J. Wysocki" Date: Fri, 31 Jul 2020 16:25:12 +0200 Message-ID: Subject: Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode To: Boris Ostrovsky Cc: Anchal Agarwal , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Juergen Gross , Linux PM , Linux Memory Management List , "Kamata, Munehisa" , Konrad Rzeszutek Wilk , roger.pau@citrix.com, Jens Axboe , David Miller , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Peter Zijlstra , Eduardo Valentin , "Singh, Balbir" , xen-devel@lists.xenproject.org, Vitaly Kuznetsov , netdev , Linux Kernel Mailing List , David Woodhouse , Benjamin Herrenschmidt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 31, 2020 at 4:14 PM Boris Ostrovsky wrote: > > On 7/30/20 7:06 PM, Anchal Agarwal wrote: > > On Mon, Jul 27, 2020 at 06:08:29PM -0400, Boris Ostrovsky wrote: > >> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > >> > >> > >> > >> On 7/24/20 7:01 PM, Stefano Stabellini wrote: > >>> Yes, it does, thank you. I'd rather not introduce unknown regressions so > >>> I would recommend to add an arch-specific check on registering > >>> freeze/thaw/restore handlers. Maybe something like the following: > >>> > >>> #ifdef CONFIG_X86 > >>> .freeze = blkfront_freeze, > >>> .thaw = blkfront_restore, > >>> .restore = blkfront_restore > >>> #endif > >>> > >>> > >>> maybe Boris has a better suggestion on how to do it > >> > >> An alternative might be to still install pm notifier in > >> drivers/xen/manage.c (I think as result of latest discussions we decided > >> we won't need it) and return -ENOTSUPP for ARM for > >> PM_HIBERNATION_PREPARE and friends. Would that work? > >> > > I think the question here is for registering driver specific freeze/thaw/restore > > callbacks for x86 only. I have dropped the pm_notifier in the v3 still pending > > testing. So I think just registering driver specific callbacks for x86 only is a > > good option. What do you think? > > > I suggested using the notifier under assumption that if it returns an > error then that will prevent callbacks to be called because hibernation > will be effectively disabled. That's correct.