From patchwork Sat Oct 26 16:18:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Raphael Tiovalen X-Patchwork-Id: 2002799 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=a4FFE26g; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TsJrqCOC; 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 4XbPwC0rcyz1xw0 for ; Sun, 27 Oct 2024 03:18:33 +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=p5EYpqXCXmcLcksjWgYiV35ksqOGf4Aa9B3HY59KKxg=; b=a4FFE26g8Leuhr AP2peOcJgh0v0niP0OWIG+WGyWCoJuSO0nYeKnviRIAv+EMdHnXoVuIRxkaii4pwvG4+dOXm+AZGB zI+tC4AmEN8VrheAcwOEYkqbaldVaWzuNm+cOX/pZ8u1zoH0fQy5GevEfa0BzybmrdqFjErQMAOTm v9dLHRSpF7PmUqsV3MhvTMeL/jXLZN+QJucZ1z5VDl3YoAdXiVyz3fa1iIPDo3rhPhh2DgdWmf8QQ 4ngntK2guFRpje0HXfXdzKaQh7IkNb1Wz0RA9EIVuzwS1IYWJykD/QxiJcQf5Ntxk7SADcDFpFaeq zq4WZLsmbH7cblfW9rnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4jUi-00000006tDv-328j; Sat, 26 Oct 2024 16:18:28 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4jUf-00000006tD2-2GwH for kvm-riscv@lists.infradead.org; Sat, 26 Oct 2024 16:18:26 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-71e953f4e7cso2171890b3a.3 for ; Sat, 26 Oct 2024 09:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729959504; x=1730564304; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5JyZ7yiPmyHL4xk6pJ9JiQBHhf05fIYRMraM7jPw8gw=; b=TsJrqCOCOQTqJnrWCG3KXIUF/lR69+G/vvpDvRb4qfJ7LV62nca+tUmiMvzC02BAVJ v0K9n6dJbC3b9JjIeBnMl1dLur2Hl6aq1CPBIeOT8dXbyYAowsDgrEJZogVEbWSVHlaN Vv6aG9TcZDfkH602r8EJJQ4tJN7h7IcCUT2ZOQEyta4akECFFdqKN2DBSYAQ8hT44BZz 24JxfEZ2r5vE2JJddBxbNwZf2A/vZYZi4bi0u4UCZo11wEqIgPh4QM0uPYRaqXZCv+ec owCm82iTLlr7LUB0o3R3uRbCZkh2OV2KW1bwa8fn7u8KrLZU9Zmmb2rP357ntXhvL63k zdug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729959504; x=1730564304; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5JyZ7yiPmyHL4xk6pJ9JiQBHhf05fIYRMraM7jPw8gw=; b=vziry/LuCVprN0q05sUPQAkf3AnVRHCXM+XbgUsGqt65tJ9zOyXqBvMUe8yh+whuZn beVznvYddi/ao9okvR/5jJchif/23o28HUxpQrOjr692G9QoaXgvKA0JD9soHZjqndir 2FAvgJwbbJlj+oJqon4J0m175Uu8a0pg87QVI4n5Pkrqkl/13yze5J/wWqGkcl+QD674 wpKhiF0umjqt3BiM3QhAu0LwLsahmpKWuU18cgdEz7IrP5oKudnTsXjhdkaaHCxlWmtE ZmjSVoNnLTT52sRr7KyNx0/39PnaiXgbD1KuyddUmvC4yTFpaIehIe5NdlofXArWNPqK GDpg== X-Forwarded-Encrypted: i=1; AJvYcCX51pQGLhLN7Ny/TevjywL9Ti9E8bwwUFqyGWIqeG14x2c6HwUKrZ5EmYMxAqnuoICABMYPMXPR6Pg=@lists.infradead.org X-Gm-Message-State: AOJu0YyhHz7dZldji6BQngcawjPIMd5qkSG81XQlAwg3DdzRzVuVCzOF boGg1sTdeE29yrmv+i8pZeqAF7wPK/qRbu+J7jbC4NCnno9BGZ9gb232SfPE X-Google-Smtp-Source: AGHT+IFnk4ReoPitP+chgKrxmrGai83F/h9KMccFgK2cqeaFe7mT7GYeGCxehzx1FgOvhA8EjDODtQ== X-Received: by 2002:a05:6a00:18a8:b0:71d:f64d:ec60 with SMTP id d2e1a72fcca58-72062f83dedmr5553924b3a.7.1729959503771; Sat, 26 Oct 2024 09:18:23 -0700 (PDT) Received: from JRT-PC.. ([202.166.44.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a1fe53sm2904317b3a.162.2024.10.26.09.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2024 09:18:23 -0700 (PDT) From: James Raphael Tiovalen To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Cc: andrew.jones@linux.dev, atishp@rivosinc.com, cade.richard@berkeley.edu, James Raphael Tiovalen Subject: [kvm-unit-tests PATCH v6 0/1] riscv: sbi: Add support to test HSM extension Date: Sun, 27 Oct 2024 00:18:12 +0800 Message-ID: <20241026161813.17189-1-jamestiotio@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241026_091825_599408_366A45FF X-CRM114-Status: GOOD ( 12.76 ) 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: This patch series adds support for testing all 4 functions of the HSM extension as defined in the RISC-V SBI specification. The only patch in version 6 of this series adds the actual test for the HSM [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:435 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -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 -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] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jamestiotio(at)gmail.com] 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 This patch series adds support for testing all 4 functions of the HSM extension as defined in the RISC-V SBI specification. The only patch in version 6 of this series adds the actual test for the HSM extension. The changes are based on the riscv/sbi branch. v6: - Rebased on top of the latest commit of the riscv/sbi branch. - Removed unnecessary cleanup code in the HSM tests after improvements to the on-cpus API were made by Andrew. v5: - Addressed all of Andrew's comments. - Added 2 new patches to clear on_cpu_info[cpu].func and to set the cpu_started mask, which are used to perform cleanup after running the HSM tests. - Added some new tests to validate suspension on RV64 with the high bits set for suspend_type. - Picked up the hartid_to_cpu rewrite patch from Andrew's branch. - Moved the variables declared in riscv/sbi.c in patch 2 to group it together with the other HSM test variables declared in patch 5. v4: - Addressed all of Andrew's comments. - Included the 2 patches from Andrew's branch that refactored some functions. - Added timers to all of the waiting activities in the HSM tests. v3: - Addressed all of Andrew's comments. - Split the report_prefix_pop patch into its own series. - Added a new environment variable to specify the maximum number of CPUs supported by the SBI implementation. v2: - Addressed all of Andrew's comments. - Added a new patch to add helper routines to clear multiple prefixes. - Reworked the approach to test the HSM extension by using cpumask and on-cpus. James Raphael Tiovalen (1): riscv: sbi: Add tests for HSM extension riscv/sbi.c | 663 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 663 insertions(+) --- 2.43.0