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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE074C4332D for ; Fri, 20 Mar 2020 21:22:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FD3320724 for ; Fri, 20 Mar 2020 21:22:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hSejiUDF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="MZOdI2m/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FD3320724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1LWmla9PQm5mqESMj+dEaGJEfKOvhpQgaQNFwzfH4fc=; b=hSejiUDFwg3h9f ed2cXf2m4LBIR6m8dRVNrQzZYWG6KLGjPIi8XFf3VLFhGHvxtknrNfxccAekQYCFspphKEdqf4pCN dxIbTiBfCJOe+aBBP/47Yo3LOn/OZLCazWHWDtQxPng7IsqUKEjPZUzDLfc3/XKY/FwNNah1/Iirb Xn0xBHQDwoSWgeOJI6/FkQx0ClNTSxQvQufuDJsn0oXUmyetl18OxLY/UpOcP1qYqolKUPUbhKUp0 azFqU43rXpi9T5vNJ9nYAWqiw8ltGAqa/qjQtnGZ+OsKORW8zbQu+hMcg7mCOccQv5bOTMdozIKWo 69H49Y7hU+hxO6Ql7GKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFP6D-0007BZ-LY; Fri, 20 Mar 2020 21:22:37 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFP6A-0007B7-4d for linux-arm-kernel@lists.infradead.org; Fri, 20 Mar 2020 21:22:35 +0000 Received: by mail-ed1-x544.google.com with SMTP id z3so8772906edq.11 for ; Fri, 20 Mar 2020 14:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KONxL1gLly0kDknOxQGf1bky+nzLW4IJ8avrVIhiwBc=; b=MZOdI2m/LjSObXiGz8zmm+Snpx+PSfA+sycrJpO0dB0yFTuWJC96L3teFfNB/3o/6O PYVmv/I2gExBSVOTSAGCHG/Qzx9T0XAwlHdGbMoufInB+Iain6qVA4UDauvbeykHjQH/ zPuugubn8aLwRmN/aGEOdcPOef0WU9pzBeX+p59QuU4S0Ol/9Z2867yR/R0APlhFULf0 PIdxurTgyeiA0m2tyMahNWUEAIMr6d+QfpIm+GGkSm9esVDKi1oeDqNDfGc5kvxnYZTf +dZG9O2CPoes01/4cyucqjRwNqEWiEjV/NqWs9lJHhIzXaiGPGMGT1y5e4AA8hrgb8J+ Ixiw== 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=KONxL1gLly0kDknOxQGf1bky+nzLW4IJ8avrVIhiwBc=; b=NuVXEm2OIHyQNO1lyDkIcwO07dItbXg8dSEPWTUoHbPkQiNv3MtJ7QCp4oRF9h/L1K Tq2XGrMvf8JYV1D74GjalW3K5ctyUih7I+ln0boCYvlmC460m4yesshQ2cf+lx74odnN tjhHMeK/z8dhnPXIdxGl7xNd0+KOA5CqMRCouLnHjIox6UuMPICzPdwBZ+1tCBf4CPEx C0zStPhiO5pS5OULyvby/OHppMvnJdnGc1GP2MBKmwfn5A/SHnrZiHNkMfLNeAS4w70a JilMoSPuiGJd5b/WwDOUi93Kp8v0ttsnF2Rkq4AUmu5oDb7RpfAVV1gCyJgfirjUM6rm zfCQ== X-Gm-Message-State: ANhLgQ1qkgce9G04ftUdB60bAMAHRlkE+L6zImLRgNQ1HXczO94QTrpR sZ/7Dm79CKvI/401nxprkU44w7LGQCVnpT4tKtH2Kw== X-Google-Smtp-Source: ADFU+vujvXgHbxTCcC9K1V64O9XtDcJZGReYC5vYcwd6qybiafpANiW6C/l9L/mbLzpY4BsBQLIigzcZLdxiAqV7pxc= X-Received: by 2002:a17:907:420b:: with SMTP id oh19mr10309566ejb.50.1584739351080; Fri, 20 Mar 2020 14:22:31 -0700 (PDT) MIME-Version: 1.0 References: <20200115143322.214247-1-james.morse@arm.com> <20200115143322.214247-4-james.morse@arm.com> In-Reply-To: <20200115143322.214247-4-james.morse@arm.com> From: Pavel Tatashin Date: Fri, 20 Mar 2020 17:22:20 -0400 Message-ID: Subject: Re: [RFC PATCH 3/3] arm64: hibernate: idmap the single page that holds the copy page routines To: James Morse X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200320_142234_259275_10766E13 X-CRM114-Status: GOOD ( 12.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi James, Sorry, for a slow response. Soon, I will send out updated MMU enabled kexec series which will have this work included. I appreciate your help with this. > Today the address it uses for this mapping is arbitrary, but to allow > kexec to reuse this code, it needs to be idmapped. To idmap the page > we must avoid the kernel helpers that have VA_BITS baked in. Makes sense. > Convert create_single_mapping() to take a single PA, and idmap it. I like the idea of using idmap in both places! > The page tables are built in the reverse order to normal using > pfn_pte() to stir in any bits between 52:48. T0SZ is always increased > to cover 48bits, or 52 if the copy code has bits 52:48 in its PA. I do not think this will work for kexec case. In hibernate we map only one page, so we can allocate every level from bottom to top, but in kexec we map many pages. So, upper levels might already exist. I think we will need to modify the loop to still go from top to bottom. Otherwise, this work makes sense. I will integrate it into my series. Thank you, Pasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel