From patchwork Thu Oct 24 12:41:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 2001701 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=apThEHBJ; 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=FXzi85hm; 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 4XZ5BP0Lgwz1xwy for ; Thu, 24 Oct 2024 23:41:17 +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=HYwMkqO33InkeEJPYgR23b0bfjB340onv9ciDvAHwkk=; b=apThEHBJP79OcP SOVJDLFQ5vln1MXA031F2zLLJxurmykzJOOjJ3vkqi77YOg6MG4tnmpT8p3DnJIRT5u2FJEh76Ypy IptXejva7MLuuWl6yODl4Z4m/KwlkoN43au3g0fDJEdo6gEw/IHLBgQ4CMla8jAnVes9CjfZ8MvM4 5yVZNcMpQCNw41vrdeCrtkzpmTbGBLjoeKs7IodGIftXnXmUXGx6IH8FJqplTbsOHjFgZVlqIqQRa kDAL3NhJvruqF1TGeEO7kueAsDdH5/80FkJUr2D1kSPZ34K7+WhDOal9N6mHYFhwkcJZdw0wlQSju kzEt+X2prC3BRsUqR47w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3x9P-00000000NdZ-2uNC; Thu, 24 Oct 2024 12:41:15 +0000 Received: from out-182.mta1.migadu.com ([95.215.58.182]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3x9L-00000000Ncx-3ekQ for kvm-riscv@lists.infradead.org; Thu, 24 Oct 2024 12:41:13 +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=1729773669; 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=KolLfOhyrnQ5fSHFNL2AMGTITVwnzdvUxuSFTMTkcuI=; b=FXzi85hmEU4gzN76x2OmG35WgAPuCTCVWnyaCH3yGrxq8tM0R21GopInueokLuCvC8+zAg gFcUtnRzg+gLZpTYeh6WnHOGJYNOB92wuQ1c+SrEtzEG99ASQ6RvK9vhPZey0EX2WpYL0Z l+9m10R6ol/iM9A8ScVI5UXLbr7xVTw= 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/3] riscv: sbi: Add SUSP tests Date: Thu, 24 Oct 2024 14:41:02 +0200 Message-ID: <20241024124101.73405-5-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-20241024_054112_223784_01F53DA9 X-CRM114-Status: UNSURE ( 4.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.8 (--) 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: Add tests for the SBI SUSP extension. Based-on: https://gitlab.com/jones-drew/kvm-unit-tests/-/commits/riscv/sbi Andrew Jones (3): riscv: Implement setjmp/longjmp riscv: sbi: Clean up env checking riscv: sbi: Add SUSP tests Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [95.215.58.182 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.182 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.182 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [95.215.58.182 listed in bl.score.senderscore.com] -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 Add tests for the SBI SUSP extension. Based-on: https://gitlab.com/jones-drew/kvm-unit-tests/-/commits/riscv/sbi Andrew Jones (3): riscv: Implement setjmp/longjmp riscv: sbi: Clean up env checking riscv: sbi: Add SUSP tests lib/riscv/asm/asm.h | 3 + lib/riscv/asm/sbi.h | 1 + lib/riscv/setjmp.S | 50 +++++++ lib/setjmp.h | 4 + riscv/Makefile | 1 + riscv/sbi-asm.S | 55 ++++++++ riscv/sbi-tests.h | 19 +++ riscv/sbi.c | 308 ++++++++++++++++++++++++++++++++++++++++---- 8 files changed, 417 insertions(+), 24 deletions(-) create mode 100644 lib/riscv/setjmp.S