Received: by 10.192.165.148 with SMTP id m20csp671670imm; Fri, 4 May 2018 04:41:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVRuJfLH7yFBVO0MolT01P0hNj3US3VXiP9I0ppVRLEFNSNwRflW9zUaapmyfaJ61j5/KT X-Received: by 2002:a65:65c4:: with SMTP id y4-v6mr17711694pgv.369.1525434073187; Fri, 04 May 2018 04:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525434073; cv=none; d=google.com; s=arc-20160816; b=JOMKnidXazA8xVIe6LwUtwOOuPvAzIvxbs1g43aaAgDP2FKh0SIBVd0z/lzrJW5lFd VErupPZGIzuRv3wTpiL2ldOi12D4xB601MmLrB61EdfRDsTLjI08MTNVbddOYuR2E1SJ HddFquj2ZXXBAZKHviiKPPdYDkTM/djhhTpoRw6zJdPyIqPHjtopjx2WoAtSPR7Gbe/D 31SMPo7mwYIeb+k4T5YG+N0gJf4id4GV5rpSf34hZxaOTpFlA8WK+tzwblLbJ5nV4vcx yjv9hCS6G75UquhGlz2rjGn8i2MPgWBnTQrjrxp7AMjhfDSS8mZObPE2hOJoWHqy/iVe th5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=yNpcxsfi94HkDtavor26Puj8UAWl1ZqGqSMFQTpUmSI=; b=YNhIzvRhtowgHdql++yDH8b+UZV2/A5CZsQYd2Wo9gEM7ozFOCHuOpZ2973aoOMN9v sT3r2xeLPsXjjk8e4ezu9/GxE1plBc5uppelF1I/L4vvagZIqFomuIjpRla/U8WfSRIH p7Z/n85r9zvVfFcmsN0ngneuecLtMZ6tV/XmbcLkkwbHgt0xrZmtLrmr5DG1q98mSgSw 7NP+jlskHrXDcrXaDprI2M+r/TYpCXmgzctCzaRisGyUTUHEJ+Kp4jNdaoZEmy/yuGnn SmJXWQltFWClabGoJIVm/Oh7SqN04YQs165RI6mI/mlZPYZkwCvBp/6Rd32gCT5paps/ 1WSg== ARC-Authentication-Results: i=1; mx.google.com; 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 87si16390670pfo.137.2018.05.04.04.40.58; Fri, 04 May 2018 04:41:13 -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; 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 S1751415AbeEDLk1 (ORCPT + 99 others); Fri, 4 May 2018 07:40:27 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52556 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbeEDLk0 (ORCPT ); Fri, 4 May 2018 07:40:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5B5901529; Fri, 4 May 2018 04:40:26 -0700 (PDT) Received: from localhost (unknown [10.37.8.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B21B93F25D; Fri, 4 May 2018 04:40:25 -0700 (PDT) Date: Fri, 4 May 2018 13:40:23 +0200 From: Christoffer Dall To: Punit Agrawal Cc: Suzuki K Poulose , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, Russell King , Catalin Marinas , Will Deacon Subject: Re: [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries Message-ID: <20180504114023.GF10191@C02W217FHV2R.local> References: <20180501102659.13188-1-punit.agrawal@arm.com> <20180501102659.13188-3-punit.agrawal@arm.com> <3eab5997-30b2-c51a-ca8e-5545bbadffc0@arm.com> <871sevr0n8.fsf@e105922-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871sevr0n8.fsf@e105922-lin.cambridge.arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 01, 2018 at 02:00:43PM +0100, Punit Agrawal wrote: > Hi Suzuki, > > Thanks for having a look. > > Suzuki K Poulose writes: > > > On 01/05/18 11:26, Punit Agrawal wrote: > >> Introduce helpers to abstract architectural handling of the conversion > >> of pfn to page table entries and marking a PMD page table entry as a > >> block entry. > >> > >> The helpers are introduced in preparation for supporting PUD hugepages > >> at stage 2 - which are supported on arm64 but do not exist on arm. > > > > Punit, > > > > The change are fine by me. However, we usually do not define kvm_* > > accessors for something which we know matches with the host variant. > > i.e, PMD and PTE helpers, which are always present and we make use > > of them directly. (see unmap_stage2_pmds for e.g) > > In general, I agree - it makes sense to avoid duplication. > > Having said that, the helpers here allow following a common pattern for > handling the various page sizes - pte, pmd and pud - during stage 2 > fault handling (see patch 4). > > As you've said you're OK with this change, I'd prefer to keep this patch > but will drop it if any others reviewers are concerned about the > duplication as well. There are arguments for both keeping the kvm_ wrappers and not having them. I see no big harm or increase in complexity by keeping them though. Thanks, -Christoffer