From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBCD4C3ABC9 for ; Thu, 15 May 2025 12:44:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFXwS-0005Ce-9X; Thu, 15 May 2025 08:44:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFXwH-0004xe-Ec; Thu, 15 May 2025 08:43:56 -0400 Received: from sender3-op-o15.zoho.com ([136.143.184.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFXwE-0007kp-Ji; Thu, 15 May 2025 08:43:52 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1747312995; cv=none; d=zohomail.com; s=zohoarc; b=QvC8qCi7ldfxJsqEMvs7vmTY+6y9zUqKSn5CAOdPg8OjYBgGtmg14CqUM7lXk35xbxUu5kusPzkWyyhQnRrHCDM9TI6M0ZzEqYxj8OrZo3Fsahimk8H2yXIB/E11aqt0oYib7nWvi8lz0WeNwFpS51l4MEDwC1qFQ3WOF2rMVEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747312995; h=Content-Type:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/stvQ7CKfZG2qrLmD8V83vEdkR/vmhNKv8wtTQoJZjI=; b=Fflgg5gm6BweCaA0JbiGxOGmdiNdraJS37Q8yLdBXhI2NfCR3xs3IbyT6GFdd+sdT+YbIcbQp35s8E1ZMKGWj+GuBTZ37+ZTssrYURoZHUgjIMrJ2jKLJqtwGNXdLTLxpIcNwvPdd4Co6YAJIic83NoemJ9CYz0hx1JBI3vz/ds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1747312995; s=zmail; d=linux.beauty; i=me@linux.beauty; h=Date:Date:Message-ID:From:From:To:To:Subject:Subject:In-Reply-To:References:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=/stvQ7CKfZG2qrLmD8V83vEdkR/vmhNKv8wtTQoJZjI=; b=l97EEIr6wqUclFNMFEyQLrd+k02jzscCjPaIn3ktf8Kn8NIM6L+2BIfVnNTFHYAh mDKeKAJZNjHTEw/o2IqCajKX93GDsC9l+JE0g7QM+Ud47eyU4FmlzrgbT4bGMR+Bv1D 8ZRVn63qq2UzZVt0199VXqFnCcGzWX0Y8ELpEFno= Received: by mx.zohomail.com with SMTPS id 1747312993212148.3516867271594; Thu, 15 May 2025 05:43:13 -0700 (PDT) Date: Thu, 15 May 2025 20:43:07 +0800 Message-ID: <87ikm2rqn8.wl-me@linux.beauty> From: Li Chen To: "Peter Maydell" , "Shannon Zhao" , "Michael S. Tsirkin" , "Igor Mammedov" , "Ani Sinha" , "Eduardo Habkost" , "Marcel Apfelbaum" , =?ISO-8859-1?Q?=22Philippe_Mathieu-Daud=E9?= =?ISO-8859-1?Q?=22?= , "Yanan Wang" , "Zhao Liu" , "Song Gao" , "Jiaxun Yang" , "Sunil V L" , "Palmer Dabbelt" , "Alistair Francis" , "Weiwei Li" , "qemu-arm" , "qemu-devel" , "qemu-riscv" Subject: [PATCH V3 3/4] tests/qtest/bios-tables-test: Add test for disabling SPCR on RISC-V In-Reply-To: <87msberqzi.wl-me@linux.beauty> References: <87msberqzi.wl-me@linux.beauty> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.15; envelope-from=me@linux.beauty; helo=sender3-op-o15.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org From: Li Chen Add ACPI SPCR table test case for RISC-V when SPCR was off. Signed-off-by: Li Chen --- tests/qtest/bios-tables-test.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d2a1aa7fb3..44de152a36 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1807,6 +1807,26 @@ static void test_acpi_aarch64_virt_tcg_acpi_spcr(void) " -machine spcr=off", &data); free_test_data(&data); } + +static void test_acpi_riscv_virt_tcg_acpi_spcr(void) +{ + test_data data = { + .machine = "virt", + .arch = "riscv64", + .tcg_only = true, + .uefi_fl1 = "pc-bios/edk2-riscv-code.fd", + .uefi_fl2 = "pc-bios/edk2-riscv-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.riscv64.iso.qcow2", + .ram_start = 0x80000000ULL, + .scan_len = 128ULL * 1024 * 1024, + .variant = ".acpispcr", + }; + + test_acpi_one("-cpu rva22s64 " + "-machine spcr=off", &data); + free_test_data(&data); +} + static void test_acpi_tcg_acpi_hmat(const char *machine, const char *arch) { test_data data = {}; @@ -2612,6 +2632,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_riscv64_virt_tcg_numamem); + qtest_add_func("acpi/virt/acpispcr", + test_acpi_riscv_virt_tcg_acpi_spcr); } } ret = g_test_run(); -- 2.49.0