From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:32892 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932630AbeB1Rph (ORCPT ); Wed, 28 Feb 2018 12:45:37 -0500 Subject: Patch "KVM: arm/arm64: Fix check for hugepage size when allocating at Stage 2" has been added to the 4.9-stable tree To: punit.agrawal@arm.com, christoffer.dall@linaro.org, gregkh@linuxfoundation.org, ioana.ciornei@nxp.com, marc.zyngier@arm.com Cc: , From: Date: Wed, 28 Feb 2018 18:45:15 +0100 In-Reply-To: <20180228164009.3907-1-punit.agrawal@arm.com> Message-ID: <15198399155164@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled KVM: arm/arm64: Fix check for hugepage size when allocating at Stage 2 to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-arm-arm64-fix-check-for-hugepage-size-when-allocating-at-stage-2.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From punit.agrawal@arm.com Wed Feb 28 18:44:38 2018 From: Punit Agrawal Date: Wed, 28 Feb 2018 16:40:09 +0000 Subject: KVM: arm/arm64: Fix check for hugepage size when allocating at Stage 2 To: stable@vger.kernel.org Cc: ioana.ciornei@nxp.com, Punit Agrawal , Marc Zyngier , Christoffer Dall Message-ID: <20180228164009.3907-1-punit.agrawal@arm.com> From: Punit Agrawal Commit 45ee9d5e97a4 ("KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2") lost the check for PMD_SIZE during the backport to 4.9. Fix this by correcting the condition to detect hugepages during stage 2 allocation. Fixes: 45ee9d5e97a4 ("KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2") Reported-by: Ioana Ciornei Signed-off-by: Punit Agrawal Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Greg Kroah-Hartman --- arch/arm/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1284,7 +1284,7 @@ static int user_mem_abort(struct kvm_vcp return -EFAULT; } - if (vma_kernel_pagesize(vma) && !logging_active) { + if (vma_kernel_pagesize(vma) == PMD_SIZE && !logging_active) { hugetlb = true; gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT; } else { Patches currently in stable-queue which might be from punit.agrawal@arm.com are queue-4.9/kvm-arm-arm64-fix-check-for-hugepage-size-when-allocating-at-stage-2.patch