On 05/28/2012 09:10 AM, Xiao Guangrong wrote:
> The huge page size is 4M on non-PAE host, but 2M page size is used in
> transparent_hugepage_adjust(), so the page we get after adjust the
> mapping level is not the head page, the BUG_ON() will be triggered
> 
> 
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 72102e0..be3cea4 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -2595,8 +2595,7 @@ static void transparent_hugepage_adjust(struct kvm_vcpu 
> *vcpu,
>                       *gfnp = gfn;
>                       kvm_release_pfn_clean(pfn);
>                       pfn &= ~mask;
> -                     if (!get_page_unless_zero(pfn_to_page(pfn)))
> -                             BUG();
> +                     kvm_get_pfn(pfn);
>                       *pfnp = pfn;
>               }
>       }

Shouldn't we adjust mask instead?

-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to