All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org, Alexander Graf <agraf@suse.com>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH kernel v3 7/7] KVM: PPC: Add support for multiple-TCE hcalls
Date: Mon, 29 Feb 2016 19:37:56 +1100	[thread overview]
Message-ID: <20160229083756.GB32418@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <56C52EF8.4050409@ozlabs.ru>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Paul Mackerras <paulus@ozlabs.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org, Alexander Graf <agraf@suse.com>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH kernel v3 7/7] KVM: PPC: Add support for multiple-TCE hcalls
Date: Mon, 29 Feb 2016 08:37:56 +0000	[thread overview]
Message-ID: <20160229083756.GB32418@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <56C52EF8.4050409@ozlabs.ru>

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.

  reply	other threads:[~2016-02-29  8:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  1:55 [PATCH kernel v3 0/7] KVM: PPC: Add in-kernel multitce handling Alexey Kardashevskiy
2016-02-15  1:55 ` Alexey Kardashevskiy
2016-02-15  1:55 ` [PATCH kernel v3 1/7] powerpc: Make vmalloc_to_phys() public Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15  3:47   ` David Gibson
2016-02-15  3:47     ` David Gibson
2016-02-15  1:55 ` [PATCH kernel v3 2/7] KVM: PPC: Rework H_PUT_TCE/H_GET_TCE handlers Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15  3:53   ` David Gibson
2016-02-15  3:53     ` David Gibson
2016-02-15  1:55 ` [PATCH kernel v3 3/7] KVM: PPC: Use RCU for arch.spapr_tce_tables Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15  1:55 ` [PATCH kernel v3 4/7] KVM: PPC: Account TCE-containing pages in locked_vm Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15  4:08   ` David Gibson
2016-02-15  4:08     ` David Gibson
2016-02-15  1:55 ` [PATCH kernel v3 5/7] KVM: PPC: Replace SPAPR_TCE_SHIFT with IOMMU_PAGE_SHIFT_4K Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15  1:55 ` [PATCH kernel v3 6/7] KVM: PPC: Move reusable bits of H_PUT_TCE handler to helpers Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-15 22:59   ` David Gibson
2016-02-15 22:59     ` David Gibson
2016-02-15  1:55 ` [PATCH kernel v3 7/7] KVM: PPC: Add support for multiple-TCE hcalls Alexey Kardashevskiy
2016-02-15  1:55   ` Alexey Kardashevskiy
2016-02-16  0:40   ` David Gibson
2016-02-16  0:40     ` David Gibson
2016-02-16  1:05     ` Paul Mackerras
2016-02-16  1:05       ` Paul Mackerras
2016-02-16  2:14       ` David Gibson
2016-02-16  2:14         ` David Gibson
2016-02-18  2:39   ` Alexey Kardashevskiy
2016-02-18  2:39     ` Alexey Kardashevskiy
2016-02-29  8:37     ` Paul Mackerras [this message]
2016-02-29  8:37       ` Paul Mackerras
2016-02-29 11:30 ` [PATCH kernel v3 0/7] KVM: PPC: Add in-kernel multitce handling Paul Mackerras
2016-02-29 11:30   ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160229083756.GB32418@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=agraf@suse.com \
    --cc=aik@ozlabs.ru \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.