RE: [PATCH] KVM: PPC: E500: Support hugetlbfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: kvm-ppc-owner@xxxxxxxxxxxxxxx 
> [mailto:kvm-ppc-owner@xxxxxxxxxxxxxxx] On Behalf Of Alexander Graf
> Sent: Tuesday, September 20, 2011 7:36 AM
> To: kvm-ppc@xxxxxxxxxxxxxxx
> Cc: kvm@xxxxxxxxxxxxxxx
> Subject: [PATCH] KVM: PPC: E500: Support hugetlbfs
> 
> With hugetlbfs support emerging on e500, we should also support KVM
> backing its guest memory by it.
> 
> This patch adds support for hugetlbfs into the e500 shadow mmu code.
> 
> Signed-off-by: Alexander Graf <agraf@xxxxxxx>
> ---
>  arch/powerpc/kvm/e500_tlb.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> index ec17148..64f75eb 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,13 +674,34 @@ 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)) {

Why check (vma && hva >= vma->vm_start) twice?

Thanks,
Yu

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux