From patchwork Wed Nov 17 15:38:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Elisei X-Patchwork-Id: 12692969 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACD8EC433EF for ; Wed, 17 Nov 2021 16:03:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71EF461B3A for ; Wed, 17 Nov 2021 16:03:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 71EF461B3A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hLBNR+H/SpF97uP8LZU9HuIp+Se70b3jD78yuL83FPM=; b=KD0Qpc/0WRwJjz gLYoS3OmAw4O58Ej7kHU1/xxWnX9le9twBlkUNvkvWX+R+j8lTaUOp9ULV0bxY7H1f1YRPnFTzBTE hifp6ZViz4S+ftiypKaocLHXUNt+jVhR98vzDzyoNYmI+lPR3fzWUa+wDDbUHmga9eeqKCiaejz3D bG0sq9VxHGJSIBebfulURUYiFBu0FHJuO3x4lpBvxsa544hAKZEGN/a96I9gX5Z1N9F2XQWuhYdkb lhAlbDF+FZFVt92RkLMyVDuJBT2iBx0h46S7xV1vCERyU8q9kGEjZ6StIHtAv5T1QWbG8teH/ERGo EbqS17ZX45q5P5UWArsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnNMy-005bFL-C2; Wed, 17 Nov 2021 16:01:08 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnN0k-005QMJ-L5 for linux-arm-kernel@lists.infradead.org; Wed, 17 Nov 2021 15:38:12 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 005C9106F; Wed, 17 Nov 2021 07:38:10 -0800 (PST) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A6CFF3F5A1; Wed, 17 Nov 2021 07:38:08 -0800 (PST) From: Alexandru Elisei To: maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, mark.rutland@arm.com Subject: [RFC PATCH v5 37/38] KVM: arm64: Make CONFIG_KVM_ARM_SPE depend on !CONFIG_NUMA_BALANCING Date: Wed, 17 Nov 2021 15:38:41 +0000 Message-Id: <20211117153842.302159-38-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211117153842.302159-1-alexandru.elisei@arm.com> References: <20211117153842.302159-1-alexandru.elisei@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211117_073810_810379_D5E5FF63 X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Automatic NUMA balancing is a performance strategy that Linux uses to reduce the cost associated with memory accesses by having a task use the memory closest to the NUMA node where the task is executing. This is accomplished by triggering periodic page faults to examine the memory location that a task uses, and decide if page migration is necessary. The periodic page faults that drive automatic NUMA balancing are triggered by clearing permissions on certain pages from the task's address space. Clearing the permissions invokes mmu_notifier_invalidate_range_start(), which causes guest memory from being unmapped from stage 2. As a result, SPE can start reporting stage 2 faults, which KVM has no way of handling. Make CONFIG_KVM_ARM_SPE depend on !CONFIG_NUMA_BALANCING to keep SPE usable for a guest. Signed-off-by: Alexandru Elisei --- arch/arm64/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index 9c8c8424ab58..5899ee95fbda 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -56,7 +56,7 @@ config NVHE_EL2_DEBUG config KVM_ARM_SPE bool "Virtual Statistical Profiling Extension (SPE) support" - depends on KVM && ARM_SPE_PMU=y + depends on KVM && ARM_SPE_PMU=y && !NUMA_BALANCING default y help Adds support for Statistical Profiling Extension (SPE) in virtual