Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp556840pxb; Wed, 25 Aug 2021 09:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0KuupKozskIffVQoBe9Z8/XNCZCdtK/wuayo0pDDkTY+BdQTwoZvorrqBiEnZobWeLPCx X-Received: by 2002:a17:906:3bc1:: with SMTP id v1mr18784822ejf.182.1629908552670; Wed, 25 Aug 2021 09:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629908552; cv=none; d=google.com; s=arc-20160816; b=K4FHDyEFMqv0axBg3hT7zFTWAZQJ/MEj5HA7E9ls4wei4+Y/xUxYSXGTDhsR1raRjJ nSCX7llFRt0QCo2RubRH1JEkN8M0Oo2+3vmZJpYnS2dkEDgjsf9ho6/evg6jqRxx18ik ldV+8pqLIVPstNYUon/bDAx0iXn1V3yeh2arwMAD2F9ZYLSk/23u9ZVJcPiU8DATp5ZX qUbWb3J5u9tJyZNPwpfmiMkDxY8iNqn+hQ0BJRYC8eEpahF4bFAb2QMYfV20/NGiNUjc uqGwcddVuidk76eA4pjYGTbsrVLCfqoL9RRTtNhQRB6hkKmIzmGRSzkTTuE14QKNnAcD xPgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=kd1aPhBo/U3Sqrqr5N6FDTrISAdbhXObc5N3VX4PSHs=; b=R+sa8BqwUoktt7edFwd2TyHikdktwRXaIESCU51Pbdj+xoF+FvCHEa8utNOEHZ6dxg F9gki2Eo9aySAdB2b3zYi2YwvGpNKoeKtnVtZMBnd4CkdLSujpXKh/7gR2jAZiiunslX /6dVlCl/Cejt0x7vhj0A5X1Lm/3cyWwr78nb2BiXe5uGmabLt+8oTJU9dGvuTGQcWoSA DAHvZ5MrlCA1qxuU0CbVqdkh/Av0zSH+2Yf/sjy2KdpBisZWqcVbAqJy+GsTRRFvRY7M hCGF7u/svMBWxW29QZ2gBevQ/P3JkwcOBLmw09iojaxeWWr0SA0+nSeY5u5tp5t0SxTW vR+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z27si181864ejf.565.2021.08.25.09.22.05; Wed, 25 Aug 2021 09:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242149AbhHYQUN (ORCPT + 99 others); Wed, 25 Aug 2021 12:20:13 -0400 Received: from foss.arm.com ([217.140.110.172]:54778 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240935AbhHYQS7 (ORCPT ); Wed, 25 Aug 2021 12:18:59 -0400 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 ABECD1042; Wed, 25 Aug 2021 09:18:13 -0700 (PDT) Received: from monolith.cable.virginm.net (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5B7E43F66F; Wed, 25 Aug 2021 09:18:12 -0700 (PDT) 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, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 38/39] KVM: arm64: Make CONFIG_KVM_ARM_SPE depend on !CONFIG_NUMA_BALANCING Date: Wed, 25 Aug 2021 17:18:14 +0100 Message-Id: <20210825161815.266051-39-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210825161815.266051-1-alexandru.elisei@arm.com> References: <20210825161815.266051-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 c6ad5a05efb3..1ea34eb29fb4 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -48,7 +48,7 @@ source "virt/kvm/Kconfig" config KVM_ARM_SPE bool "Virtual Statistical Profiling Extension (SPE) support" - depends on ARM_SPE_PMU=y + depends on ARM_SPE_PMU=y && !NUMA_BALANCING default y help Adds support for Statistical Profiling Extension (SPE) in virtual -- 2.33.0