Message ID | 20181019125901.185478-23-marc.zyngier@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47A681750 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Oct 2018 14:49:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31E28205FD for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Oct 2018 14:49:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2266520683; Fri, 19 Oct 2018 14:49:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9D376205FD for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Oct 2018 14:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SgzFNgAD9CKbJepHFiZuvE/MCQ2FiQvp+ADsV9gqvIU=; b=eouwanXnAJHgcz eQ+6Jc3Y1b5DbWQ3v24TDMmhbef9UVk4CECV2aZtwFQh2EYZt257CkF7O+NFWkuNLE4zTE6NR7Drr lhmkojdOGR+nNR4NqXiq8t2KXlblk/W7NUJhu0QqNadOFocD5pM6UWtzBL/IWInJ+x9mjYisBtSTy obhE3b8xDqj2Ju2sSnWOx5pqHyjRg8wE05uVSPIEH7MQEQ7Gw6FTVD3tinlMKRYGKqyHV+DMyTcjv FlOgOs6Ly4UQeHzaGOhWCIg/C6o9i1FhW20lGFYjfiGfivQuTBTDYKPBBTj/H1SUtot85wSKFSbod qyhjgWGykgY/G4CpYZlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDW5z-0000Bj-Iw; Fri, 19 Oct 2018 14:49:47 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDW3I-0007YG-74 for linux-arm-kernel@bombadil.infradead.org; Fri, 19 Oct 2018 14:47:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4zGo3wJjeq4c7UhlS4XHd395FgxwbwWpGmdR9ePHVfU=; b=pnGDMWsvI++91xFkcDLii+XM2S G+ojFz4qJpWpuzFOk/owpTaczBxZsSOruj2F39/0raR29S6RQ9d2a3UhILU6C0iGPpYy3DZ5KgmO1 7CZNp+s9xdq2z8UrqAu68mrNYCy5IHVkD62I5hHS6w81OWwqGsoV4I2YtjMur5GqjeXMcMTRab4sv IFWywBTcA/qebc+vQ2oa7rD27xD6rbZa15SdQhDan1xXd02XCf3N5bsxKyFb8F+X2p23rFN56eJX3 9JccaIFGq9cU+64nOWAuAC5BLUO89czO91O7U7kaBOc7sx/z2ZUh66RbEzGBvjWIQVI6vtHEsu7hz 8FxWAY4g==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDUO6-0005RS-Vg for linux-arm-kernel@lists.infradead.org; Fri, 19 Oct 2018 13:00:28 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CEE7715BF; Fri, 19 Oct 2018 06:00:22 -0700 (PDT) Received: from filthy-habits.cambridge.arm.com (filthy-habits.cambridge.arm.com [10.1.196.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 308323F71D; Fri, 19 Oct 2018 06:00:20 -0700 (PDT) From: Marc Zyngier <marc.zyngier@arm.com> To: Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= <rkrcmar@redhat.com> Subject: [PATCH 22/26] KVM: arm/arm64: Ensure only THP is candidate for adjustment Date: Fri, 19 Oct 2018 13:58:57 +0100 Message-Id: <20181019125901.185478-23-marc.zyngier@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181019125901.185478-1-marc.zyngier@arm.com> References: <20181019125901.185478-1-marc.zyngier@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181019_090023_115784_CEE27C7E X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, zhong jiang <zhongjiang@huawei.com>, kvm@vger.kernel.org, Suzuki K Poulose <suzuki.poulose@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Punit Agrawal <punit.agrawal@arm.com>, Christoffer Dall <christoffer.dall@arm.com>, Kristina Martsenko <kristina.martsenko@arm.com>, Dongjiu Geng <gengdongjiu@huawei.com>, Eric Auger <eric.auger@redhat.com>, James Morse <james.morse@arm.com>, Robin Murphy <robin.murphy@arm.com>, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[01/26] kvm: arm/arm64: Fix stage2_flush_memslot for 4 level page table
|
expand
|
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index 7e477b3cae5b..c23a1b323aad 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -1231,8 +1231,14 @@ static bool transparent_hugepage_adjust(kvm_pfn_t *pfnp, phys_addr_t *ipap) { kvm_pfn_t pfn = *pfnp; gfn_t gfn = *ipap >> PAGE_SHIFT; + struct page *page = pfn_to_page(pfn); - if (PageTransCompoundMap(pfn_to_page(pfn))) { + /* + * PageTransCompoungMap() returns true for THP and + * hugetlbfs. Make sure the adjustment is done only for THP + * pages. + */ + if (!PageHuge(page) && PageTransCompoundMap(page)) { unsigned long mask; /* * The address we faulted on is backed by a transparent huge