From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH kernel v3 7/7] KVM: PPC: Add support for multiple-TCE hcalls Date: Mon, 29 Feb 2016 19:37:56 +1100 Message-ID: <20160229083756.GB32418@fergus.ozlabs.ibm.com> References: <1455501309-47200-1-git-send-email-aik@ozlabs.ru> <1455501309-47200-8-git-send-email-aik@ozlabs.ru> <56C52EF8.4050409@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@lists.ozlabs.org, Alexander Graf , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Alexey Kardashevskiy Return-path: Received: from ozlabs.org ([103.22.144.67]:54021 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbcB2IiE (ORCPT ); Mon, 29 Feb 2016 03:38:04 -0500 Content-Disposition: inline In-Reply-To: <56C52EF8.4050409@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 18, 2016 at 01:39:52PM +1100, Alexey Kardashevskiy wrote: > > The latest powerkvm kernel passes @thp instead of NULL and check for it > below in addition to (shift > PAGE_SHIFT), should it be fixed here as well? > > Is that possible for __find_linux_pte_or_hugepte() return thp==true but > shift<=PAGE_SHIT, assuming we call it on vcpu->arch.pgdir, not an ordinary > task pgdir? Looking at the code for __find_linux_pte_or_hugepte, if it returns thp==true then it must return shift==PMD_SHIFT, which is 24 for Book3S 64 with 64k pages. With 4k pages, we don't get the option to enable THP (on Book3S 64). Other platforms might return other values, but they would always be greater than PAGE_SHIFT. Paul.