Received: by 10.213.65.68 with SMTP id h4csp215724imn; Fri, 16 Mar 2018 00:16:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELuSN5UeJp8d9pdSxDcT/KgDjdK6YgRl8z50nZQ3TTZ5RV7kxMdm8JlDDxAmcFQzn1J1Znru X-Received: by 10.99.177.7 with SMTP id r7mr667815pgf.76.1521184574940; Fri, 16 Mar 2018 00:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521184574; cv=none; d=google.com; s=arc-20160816; b=zUq35zm+Zy3Arl8RJoOrmrFPT1W66d7ksKMHnU0DqW6gOkAQPPC8KhxzZpbiOz69ux e2SZusEJJkYAkp4Lpv5DCYzKIf+ezN0m0D0eajGGvGQFpzULKbkLbdLIMEeX1MAGdZuL hjvunDK6JlJ///jbQqLGGTsz+fzjsajqhjgfIAAhDK+BWuN8qetuDYJSB5ww8VOTvFqj sHEQrojCPO6d7v1SUSWhm3QSSkEqfaj0hrwpeVfmAnYliTeGWFeEmro7vHXnjfpePin3 zcnWnZ8ON2QD107b7Y37GBrtV4cvcVZeplu0yswhk+zpfIy3KO20ymp3Pe/kzi+Yf9Q2 ZfjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=hPB1atSePrr14chfCSe+hBPtRUEHmlSOae6M8CBS4A8=; b=z8X04I9TGZrl1IkWyFqaRDQoz0ei0gcqIUSK30fGSNzgEc/Rfn8jnPVOSCWLi8WpU/ OlAOc9FpN6KRixAbwfaTI5VCLSuDEmVG40w8LP47Mc/8PUarfnIzZxRbDDdwXE7md1vh ZT6WB5eTxJbpEgdiS0ZYR2G9afYYNEzOkxKjtkob8U3ru8tdNizqktZ03zzMGjdB7UU9 LKYtwYP92V1dJqyq1U59tc9wClGC2H0LE+FDjY3TuR8yetywEZ32fxcVqvVjOb+GKN+T hT7sFxR4EDhVC/9SYHc0BiFi6ox90xfLK0321b4fh1OuZPYTLU9uIJb5bCTQxUzz7TLI VbHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaO1e2mR; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaO1e2mR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si4589036pgu.454.2018.03.16.00.16.00; Fri, 16 Mar 2018 00:16:14 -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=@codeaurora.org header.s=default header.b=OaO1e2mR; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaO1e2mR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753102AbeCPHOr (ORCPT + 99 others); Fri, 16 Mar 2018 03:14:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33904 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbeCPHOp (ORCPT ); Fri, 16 Mar 2018 03:14:45 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E03546016D; Fri, 16 Mar 2018 07:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521184484; bh=95SDScZjENwSR0M5XwQXszf50VO4oXdc53Eej1E8npE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OaO1e2mRzx0+9ApvAJTalnGpql8WrHhlv1FKbwnz33vYUzBqbOuGWO/PEzdLFwoam H/5YY/sMM+IzeTTWf++AaqjB5tgi3izlmOrOKq7MHmKxCsa4RPAzxBOIUmO6kNMJMp ePr+0sfR4+kPiVKncqrcxVWf+q/GOqiKHK4Ha9AU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C8FD6016D; Fri, 16 Mar 2018 07:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521184484; bh=95SDScZjENwSR0M5XwQXszf50VO4oXdc53Eej1E8npE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OaO1e2mRzx0+9ApvAJTalnGpql8WrHhlv1FKbwnz33vYUzBqbOuGWO/PEzdLFwoam H/5YY/sMM+IzeTTWf++AaqjB5tgi3izlmOrOKq7MHmKxCsa4RPAzxBOIUmO6kNMJMp ePr+0sfR4+kPiVKncqrcxVWf+q/GOqiKHK4Ha9AU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6C8FD6016D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH v2 2/4] ioremap: Implement TLB_INV before huge mapping To: Mark Rutland Cc: catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, james.morse@arm.com, kristina.martsenko@arm.com, takahiro.akashi@linaro.org, gregkh@linuxfoundation.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org, toshi.kani@hpe.com References: <1521117906-20107-1-git-send-email-cpandya@codeaurora.org> <1521117906-20107-3-git-send-email-cpandya@codeaurora.org> <20180315131316.fd5ftqwgdb5bf5we@lakrids.cambridge.arm.com> <839387ee-e1c2-cc71-c06a-7bc2d0eda73d@codeaurora.org> <20180315151645.fsgcywyawvtiwx52@lakrids.cambridge.arm.com> From: Chintan Pandya Message-ID: <7d1716a1-0a69-4851-68c6-ebc00d2e8e1d@codeaurora.org> Date: Fri, 16 Mar 2018 12:44:36 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180315151645.fsgcywyawvtiwx52@lakrids.cambridge.arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/15/2018 8:46 PM, Mark Rutland wrote: > On Thu, Mar 15, 2018 at 06:55:32PM +0530, Chintan Pandya wrote: >> On 3/15/2018 6:43 PM, Mark Rutland wrote: >>> On Thu, Mar 15, 2018 at 06:15:04PM +0530, Chintan Pandya wrote: >>>> Huge mapping changes PMD/PUD which could have >>>> valid previous entries. This requires proper >>>> TLB maintanance on some architectures, like >>>> ARM64. >>> >>> Just to check, I take it that you mean we could have a valid table >>> entry, but all the entries in that next level table must be invalid, >>> right? >> >> That was my assumption but my assumption can be wrong if any VA gets >> block mapping for 1G directly (instead of the 2M cases we discussed >> so far), then this would go for a toss. > > Ok. Just considering the 4K -> 2M case, is that an assumption, or a > guarantee? For 4K->2M case, that's confirmed. I mean, while mapping 2M, all the next level entries will be unmapped and cleared. That gets ensured before we land to page table code. But if someone calls these page table APIs directly without respecting previous mappings, we will not hit BUG_ON() anywhere but a crash later in unfamiliar situations. But that's the wrong thing to do. > > Thanks, > Mark. > Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project