Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5788667ybl; Tue, 27 Aug 2019 09:39:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxS/ge/ZYesAO4JkfZfw25/CnMVucfYFwQxTJAFV5Jo5AvDooRr/PBtJhTFSAyd3R3ctdaX X-Received: by 2002:a63:24a:: with SMTP id 71mr21761002pgc.273.1566923955980; Tue, 27 Aug 2019 09:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566923955; cv=none; d=google.com; s=arc-20160816; b=Iw6wgxN85WCed7pzm9d+iDrnukEgBmfx/nobRHMnYFJcOdRm4chxbP1Q2ntCPBaHGr oHlbROFVGVTtFVjcZqGb5xF2IE5C5vND+Bngl+sz7uqe8pIDV8MYIIrvwom08QWlkfZX oEaDqSlVNlOEquvqL144LTWzFZxaGN9SiqS5P6IKTRgbo9djl9CynI6j0RZCE2WoPEO+ I0fdjfJzcp51qX+d+CvtIox2fTl8ODoLvn/9lVR6k6qxOJkj6Ob9/quWn53lywZjd/rI I5JzQiagH2P3IAlIiNER5x5opuyjRDT58fxBccr1pEuVqa95POeeiXysoiof0q0QQK1T c7cg== 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:dkim-signature; bh=xIYv3BU6JaefmDoaa35ZOIFyAcL76S8KOZAwhz7dmjk=; b=wZixqsfwa9/WrzpOkA8kb71+eFwhy1RCCkVsQ+T1mP3IrpjHwMCdVgbMfZKwYxICgC BmgmL4yo7kMPopY9fUqSznA/yJxw3a7WrWDDx3kv2H2SJgLWGWcrrhxqt1RWr/Jpitzf 2r0hsO+qCbY9hZG3IX/oUsYZgKpAlKiFe45PAZJTJmQaX/x0YMM+912K24yUtdkLgr9q SlJhjB1G2p0Bk4xykXEA08p03LtuyYHexY3Y3itubk1V8c8wiKxczQhEKoFbO5zamG91 bSbJk9tmpOrPA7V5k4KqPeiEWEYBdw+uNvZdUgXt4i1pKvyKqeXxupQU0NLNg1Zyi/DK KhpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vo95IgAE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go13si13225817plb.297.2019.08.27.09.38.59; Tue, 27 Aug 2019 09:39:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vo95IgAE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728670AbfH0Qgn (ORCPT + 99 others); Tue, 27 Aug 2019 12:36:43 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:40175 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726522AbfH0Qgn (ORCPT ); Tue, 27 Aug 2019 12:36:43 -0400 Received: by mail-yb1-f195.google.com with SMTP id t15so2616056ybg.7; Tue, 27 Aug 2019 09:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xIYv3BU6JaefmDoaa35ZOIFyAcL76S8KOZAwhz7dmjk=; b=Vo95IgAEhgkNSJYTdAHV9CshPC53hILvjZxbesLEwpL5SGwfG4rrSG7lpbFWOyFwdd L/oParCC7vynXx6fUef7UPK8l5zVZaq1Yxx6lbk//Oo+R/F5oSJgW3yEEnVnUUYLZL2s qDZXxUApfo+cXrDcVn18cxCmyt/pmIY+sBUgFibjYHsBwoo6xDP1P6kS595/e9hPc7ZM 4Z+ps6QRLleJKxK1O1ittPb03GZlCcQFtKL6avDLDUJeZ3bUXLE0Yk0fnRc9BbCOcRwN 0g2eAXOHYkQE/HlMPDj75FFr/98pjzdxGQoAAaCXNjQhfgWGUL19E65/deHErPXdYiDI dwvA== 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=xIYv3BU6JaefmDoaa35ZOIFyAcL76S8KOZAwhz7dmjk=; b=KKhAfhuWgjpzoaklwF4hVS+Bfz+h5GLZvNGC8GObBYQl2lwrf9jcWbp4ViEPyUVavS IHYLViEkVGtKyTK51LL0YHlSdYbzyQDIwb170Vd+4QqKdow9fFsq/W3iFJnLxTAQcR6g LHe1kmxW+cRi48FGR6CcsrCMmgk3lbQbICai2cVIwhYWSYa0ULJFzu/PS/kzslw1fQvW WNhNTgSpBkJwxSOszgTI8fTPOoGmwJyF7lNY+5R8044f7GxfB6/wz+18z2FxZrFmcYj2 sCS373DH7l6M9uuxJZh0CqJpBV4Vkyh4Eg9LYynYD3aduXY9m2KWQKd8Grjtyd9BdMm6 PwbQ== X-Gm-Message-State: APjAAAX7y4Z+5SXWPoq7qPBbbpAXIFZi+nl3QGoe5nVeLhkEvj4CuD1D nONdUkGz2mypqbPDnsaSTad3xxbjW5E479UZn8nqHvmK X-Received: by 2002:a25:d490:: with SMTP id m138mr17642647ybf.341.1566923802051; Tue, 27 Aug 2019 09:36:42 -0700 (PDT) MIME-Version: 1.0 References: <20190826081752.57258-1-kkamagui@gmail.com> In-Reply-To: From: Seunghun Han Date: Wed, 28 Aug 2019 01:36:30 +0900 Message-ID: Subject: Re: [PATCH] x86: tpm: Remove a busy bit of the NVS area for supporting AMD's fTPM To: Matthew Garrett Cc: Jarkko Sakkinen , Matthew Garrett , Peter Huewe , "open list:TPM DEVICE DRIVER" , Linux Kernel Mailing List 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 Tue, Aug 27, 2019 at 1:23 AM Seunghun Han wrote: > > If the regions allocated in the NVS region need to be handled by a > > driver, the callback mechanism is good for it. However, this case > > doesn't need it because the regions allocated in NVS are just I/O > > regions. > > > > In my opinion, if the driver wants to handle the region in the NVS > > while suspending or hibernating, it has to use register_pm_notifier() > > function and handle the event. We already had the mechanism that could > > ensure that the cases you worried about would be handled, so it seems > > to me that removing the busy bit from the NVS region is fine. > > No. The NVS regions are regions that need to be saved and restored > over hibernation, but which aren't otherwise handled by a driver - > that's why the NVS code exists. If drivers are allowed to bind to NVS > regions without explicit handling, they risk conflicting with that. I got your point. Is there any problem if some regions which don't need to be handled in NVS area are saved and restored? If there is a problem, how about adding code for ignoring the regions in NVS area to the nvs.c file like Jarkko said? If we add the code, we can save and restore NVS area without driver's interaction. Seunghun