From patchwork Wed Nov 6 09:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 2007399 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=QS6R4P7H; 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=Zp/JyKYe; 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 4Xk1bs0H21z1xyM for ; Wed, 6 Nov 2024 21:27:18 +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=4peG4K8ghAnDG7wKONAnl1Lk8AiKLB9TgjQZHvfa4Ko=; b=QS6R4P7HunNqJq r+kPs9sPD3BRtuXpWXGeXAkz7I5tXlOx2m2yZX+XAgRKQDptYuO1No5J/fR0v3zz/rtfoGav1S8lf GXmIJoerpQrhF6K0jyv1oqKRAnVZ34flib1/xWCNUYPj35HlipSfz35lStxtuxDz2yssfd7N3YHqa xcte8kBqGpMcTvp2RScpJoWVe1WPcfRC81yD2FKrAM2N6GwB5dzrMWWMYKt7Wt7DEjyvZ6EPXrrJV FbUeZRZWTEkvBIz+rsQ7hd0L91HT2hnN8L/4I0wJmmt2XdgedtaZ5WI0+jU0QvnCFU4eytTAvHl1w nUGi0Mwh+McqK8vGEliA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8dFs-00000002k7o-246V; Wed, 06 Nov 2024 10:27:16 +0000 Received: from out-181.mta0.migadu.com ([2001:41d0:1004:224b::b5]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8cWb-00000002aTm-3d7T for kvm-riscv@lists.infradead.org; Wed, 06 Nov 2024 09:40:31 +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=1730886026; 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=/Nf//oMm1jXKJtNESLqpXj4iYiNyKQ+J2gfB8vo39zw=; b=Zp/JyKYeEDdz1qFLHMY1j8zdPzEkVhXiBUdn2oyGFNZ8WllVtmQILTQIgf/+mQ761a/+Le TJrPkf+0S+Z67fFRBUbSjzY7twe7ZVb7m2Y48yzluyCWzRcqZn7OT6pQHtQwVFjsYb8MJu YFHpn1MJjLh2f2QAAyFIzeKZl8XTDJw= 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] riscv: sbi: Prepare for assembly entry points Date: Wed, 6 Nov 2024 10:40:16 +0100 Message-ID: <20241106094015.21204-2-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-20241106_014030_344856_395BC4E6 X-CRM114-Status: GOOD ( 10.94 ) 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: From: James Raphael Tiovalen The HSM tests will need to test HSM start and resumption from HSM suspend. Prepare for these tests, as well other tests, such as the SUSP resume tests, by providing an assembly file for SBI tests. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 -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 From: James Raphael Tiovalen The HSM tests will need to test HSM start and resumption from HSM suspend. Prepare for these tests, as well other tests, such as the SUSP resume tests, by providing an assembly file for SBI tests. Signed-off-by: James Raphael Tiovalen Signed-off-by: Andrew Jones --- riscv/Makefile | 3 ++- riscv/sbi-asm.S | 12 ++++++++++++ riscv/sbi-tests.h | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 riscv/sbi-asm.S create mode 100644 riscv/sbi-tests.h diff --git a/riscv/Makefile b/riscv/Makefile index 22fd273acac3..734441f94dad 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o ifeq ($(ARCH),riscv32) cflatobjs += lib/ldiv32.o endif +cflatobjs += riscv/sbi-asm.o ######################################## @@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv asm-offsets = lib/riscv/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S new file mode 100644 index 000000000000..fbf97cab39c8 --- /dev/null +++ b/riscv/sbi-asm.S @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Helper assembly code routines for RISC-V SBI extension tests. + * + * Copyright (C) 2024, James Raphael Tiovalen + */ +#define __ASSEMBLY__ + +#include "sbi-tests.h" + +.section .text + diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h new file mode 100644 index 000000000000..c28046f7cfbd --- /dev/null +++ b/riscv/sbi-tests.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _RISCV_SBI_TESTS_H_ +#define _RISCV_SBI_TESTS_H_ + + +#endif /* _RISCV_SBI_TESTS_H_ */