From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, B13201@freescale.com
Subject: Re: [PATCH] KVM: PPC: E500: Support hugetlbfs
Date: Wed, 05 Oct 2011 16:06:11 +0000 [thread overview]
Message-ID: <4E8C8073.8080306@freescale.com> (raw)
In-Reply-To: <1317825450-605-1-git-send-email-agraf@suse.de>
On 10/05/2011 09:37 AM, Alexander Graf wrote:
> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> index ec17148..1dd96a9 100644
> --- a/arch/powerpc/kvm/e500_tlb.c
> +++ b/arch/powerpc/kvm/e500_tlb.c
> @@ -24,6 +24,7 @@
> #include <linux/sched.h>
> #include <linux/rwsem.h>
> #include <linux/vmalloc.h>
> +#include <linux/hugetlb.h>
> #include <asm/kvm_ppc.h>
> #include <asm/kvm_e500.h>
>
> @@ -673,12 +674,31 @@ static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
> pfn &= ~(tsize_pages - 1);
> break;
> }
> + } else if (vma && hva >= vma->vm_start &&
> + (vma->vm_flags & VM_HUGETLB)) {
> + unsigned long psize = vma_kernel_pagesize(vma);
> +
> + tsize = (gtlbe->mas1 & MAS1_TSIZE_MASK) >>
> + MAS1_TSIZE_SHIFT;
> +
> + /*
> + * Take the largest page size that satisfies both host
> + * and guest mapping
> + */
> + tsize = min(__ilog2(psize) - 10, tsize);
Any reason for __ilog2() rather than ilog2()? Shouldn't make a
difference, just curious about avoiding the public interface.
Either way,
Acked-by: Scott Wood <scottwood@freescale.com>
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: <kvm@vger.kernel.org>, <kvm-ppc@vger.kernel.org>, <B13201@freescale.com>
Subject: Re: [PATCH] KVM: PPC: E500: Support hugetlbfs
Date: Wed, 5 Oct 2011 11:06:11 -0500 [thread overview]
Message-ID: <4E8C8073.8080306@freescale.com> (raw)
In-Reply-To: <1317825450-605-1-git-send-email-agraf@suse.de>
On 10/05/2011 09:37 AM, Alexander Graf wrote:
> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> index ec17148..1dd96a9 100644
> --- a/arch/powerpc/kvm/e500_tlb.c
> +++ b/arch/powerpc/kvm/e500_tlb.c
> @@ -24,6 +24,7 @@
> #include <linux/sched.h>
> #include <linux/rwsem.h>
> #include <linux/vmalloc.h>
> +#include <linux/hugetlb.h>
> #include <asm/kvm_ppc.h>
> #include <asm/kvm_e500.h>
>
> @@ -673,12 +674,31 @@ static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
> pfn &= ~(tsize_pages - 1);
> break;
> }
> + } else if (vma && hva >= vma->vm_start &&
> + (vma->vm_flags & VM_HUGETLB)) {
> + unsigned long psize = vma_kernel_pagesize(vma);
> +
> + tsize = (gtlbe->mas1 & MAS1_TSIZE_MASK) >>
> + MAS1_TSIZE_SHIFT;
> +
> + /*
> + * Take the largest page size that satisfies both host
> + * and guest mapping
> + */
> + tsize = min(__ilog2(psize) - 10, tsize);
Any reason for __ilog2() rather than ilog2()? Shouldn't make a
difference, just curious about avoiding the public interface.
Either way,
Acked-by: Scott Wood <scottwood@freescale.com>
-Scott
next prev parent reply other threads:[~2011-10-05 16:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-19 23:35 [PATCH] KVM: PPC: E500: Support hugetlbfs Alexander Graf
2011-09-19 23:35 ` Alexander Graf
2011-09-20 17:54 ` Scott Wood
2011-09-20 17:54 ` Scott Wood
2011-09-24 7:44 ` Alexander Graf
2011-09-24 7:44 ` Alexander Graf
2011-09-26 20:28 ` Scott Wood
2011-09-26 20:28 ` Scott Wood
2011-09-22 6:50 ` Liu Yu-B13201
2011-09-24 7:47 ` Alexander Graf
2011-09-24 7:47 ` Alexander Graf
2011-09-26 20:04 ` Scott Wood
2011-09-26 20:04 ` Scott Wood
2011-10-05 14:37 ` Alexander Graf
2011-10-05 14:37 ` Alexander Graf
2011-10-05 16:06 ` Scott Wood [this message]
2011-10-05 16:06 ` Scott Wood
2011-10-05 18:55 ` Alexander Graf
2011-10-05 18:55 ` Alexander Graf
2011-10-05 19:53 ` Scott Wood
2011-10-05 19:53 ` Scott Wood
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=4E8C8073.8080306@freescale.com \
--to=scottwood@freescale.com \
--cc=B13201@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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.