From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D627606A322 for ; Fri, 4 Dec 2026 12:21:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=oF1y4Lmo; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=WCSu6hPK DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=XBoz6k2mrjrhAPRhOg/RWGnSSOtvfti12mW1avqUaGw=; b=oF1y4LmoD4B7UwFpN2UJMqiGGk sXO+eyrjgOTG4DXgOlhSCAJXGRCic7Caph+pTy7NI7L7KDqsGsd6roAuqQz/LoQIHMfq2j2X7aVc3 RP+es35bUK0gkY7wbl7/jg2rOtH3wDZLhpRQ/tc6ML7UAhb8fkW78ur1n1G/ayP8VsrWu3f2M8dnJ qY1uUXEdZ9Bbp/UaQ/PsbZ4wSYfO25tpE8tCVOLzFEQaz9k4PZH+gEj61kMiTpcUVuaMdd+KU0zUC qRK+Aavnl3Zt9mBu+cK+HZo5X5MxG/eW1+MutfT7rs/sgRfxE9MylYdQqwloxE3RGeeoxsF2+C3NU bqyk49cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZSHM-00000000GDt-0sMN; Fri, 04 Dec 2026 12:20:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZSHH-00000000GBg-1MvN for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 12:20:42 +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 2A0DD1477; Fri, 4 Dec 2026 04:20:35 -0800 (PST) Received: from localhost (unknown [10.2.196.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B29F3F86F; Fri, 4 Dec 2026 04:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796386837; bh=ENCDSbm3MO5Rk+ZBy12w8GyLTMOX700D1p7myfKpq8A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WCSu6hPKu1LoQgUzK7CHl58qn8kWt2D3iUXBGHo2gMgeaeRYmwzELM7nVWRJlPelr m3J6Qrls25vTfzDJIkXUu/sPg+/yV8OZhfzXLFMlnhx1HA/XjzyM+R84tTNCc0qQwj c5UYpW1zR0nwzD4qQzlPFhanEVW2G/5CFRqSYuLc= Date: Fri, 4 Dec 2026 12:20:35 +0000 From: Leo Yan To: James Clark Cc: Marc Zyngier , Oliver Upton , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , Sean Christopherson , Shuah Khan , Colton Lewis , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: selftests: Pin vpmu_counter_access to one CPU Message-ID: <20261204122035.GA3159023@e132581.arm.com> References: <20261125-james-kvm-pin-pmu-test-v1-1-c3ce989233fb@linaro.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261125-james-kvm-pin-pmu-test-v1-1-c3ce989233fb@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_042039_409892_B04FD97E X-CRM114-Status: GOOD ( 14.08 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, Nov 25, 2026 at 03:36:03PM +0000, James Clark wrote: > The vpmu_counter_access test reads the maximum PMCR_EL0.N from one VM > and then creates new VMs for each number of counters up to that limit. > If the test migrates between CPU types the limit may not be valid for > the new VM which causes: > > ==== Test Assertion Failure ==== > arm64/vpmu_counter_access.c:483: !ret > pid=9165 tid=9165 errno=22 - Invalid argument > ... > KVM_SET_DEVICE_ATTR failed, rc: -1 errno: 22 (Invalid argument) > > For example on a Radxa Orion O6 with 20 counters on the big cores and 6 > on the little cores, this happens on most runs. > > Fix it by pinning the test to the CPU that it starts on before any VMs > are created. It seems pinning the test thread is sufficient here. The same thread calls vcpu_run(), so the guest also runs on that CPU. > Signed-off-by: James Clark Reviewed-by: Leo Yan