From patchwork Wed Oct 23 13:21:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 2001081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=PLXH+dw5; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=BMe3gApH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XYV8Y3dh9z1xwf for ; Thu, 24 Oct 2024 00:22:37 +1100 (AEDT) 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:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=entgoSGH7+CG+r7wFQyeofk83aT4XOiEiqlRvWCVba8=; b=PLXH+dw5N2Mg27 NH3WBbQWw1ga9q85mAX9fedqTHpIEMoRD/1IEhjlNaAD5tHVVp+uyyPDEw5om9x/FFovlX+LYXUil oW1l5fUiKO4ynh7ZQiXH3dB57EW+fd3uuEd5AQ76Ht1e32FaerF6SrGo86C1P9kjRGBovMr0D4oqo ZVdGv589K+yNrU6wpObd8y+e5AXIv1V46oB0mcfVcRLLK8XGlIojvW+S5JZF5gL4uCDQDH4owJdVt stDdut1ty+H+RrAd0wzScDh7OciLve7lUFgWqtszDaas9Q3q1XdsuFo+d9Zm7EJ9hTEr2C1ukWXix ry2uHQ5/s4plGxRZkQlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3bJs-0000000EWfL-0VXB; Wed, 23 Oct 2024 13:22:36 +0000 Received: from out-171.mta1.migadu.com ([2001:41d0:203:375::ab]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3bIt-0000000EWSv-2DDL for kvm-riscv@lists.infradead.org; Wed, 23 Oct 2024 13:21:37 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1729689693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZWAge5DwWpyd6zDBAXhwrsb7ZOmrngnHmH6FH9aj9r8=; b=BMe3gApHxER/v0b18qrEfrX9/Vxy8hKbZkuS2SVATk/jkDjOoGyPC1rvsIWXrVHIFl8reP vr0LeT9PPoU9t8r4txmHGIQLyHDNtlg51hFkeGj0dcKFZEXXWhITUXvf3E8mvGtuRM3P3s jnYR7Wb3e10sXXwB0eAqfWXSlFR1b4E= From: Andrew Jones To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Cc: atishp@rivosinc.com, jamestiotio@gmail.com Subject: [kvm-unit-tests PATCH 0/4] riscv: A few SMP fixes Date: Wed, 23 Oct 2024 15:21:31 +0200 Message-ID: <20241023132130.118073-6-andrew.jones@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_062135_749544_96574C93 X-CRM114-Status: UNSURE ( 7.71 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tl;dr - these patches are improvement to the riscv framework to better support the SBI HSM tests. The first patch is a simpler alternative to [1] and [2] which doesn't require us to decide how best to make the number configurable. The second patch just adds sanity checking to make sure we can expe [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org tl;dr - these patches are improvement to the riscv framework to better support the SBI HSM tests. The first patch is a simpler alternative to [1] and [2] which doesn't require us to decide how best to make the number configurable. The second patch just adds sanity checking to make sure we can expect the SBI implementation to accept all hartids mapped from the present mask. The third patch was already posted once before[3] with a slightly different summary. It and the last patch improve smp_boot_secondary() since the SBI HSM tests were attempting to make workarounds for odd behaviors. [1] https://lore.kernel.org/all/20240820170150.377580-2-andrew.jones@linux.dev/ [2] https://lore.kernel.org/all/20240903143946.834864-6-andrew.jones@linux.dev/ [3] https://lore.kernel.org/all/20240904120812.1798715-2-andrew.jones@linux.dev/ Andrew Jones (4): riscv: Bump NR_CPUS to 256 riscv: Filter unmanaged harts from present mask riscv: Fix secondary_entry riscv: Rework smp_boot_secondary lib/riscv/asm/processor.h | 1 + lib/riscv/asm/setup.h | 2 +- lib/riscv/setup.c | 11 ++++++--- lib/riscv/smp.c | 49 +++++++++++++++++++++++++++------------ riscv/cstart.S | 7 +++--- 5 files changed, 48 insertions(+), 22 deletions(-)