From nobody Mon Nov 25 10:30:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716531374; cv=none; d=zohomail.com; s=zohoarc; b=L9ejqL+i8STugYNgsJhhSLEG44RX0LaSJ5lXinho07As7WUR2QG9WpnRtHZE7CnRMqsKAmqjFVCBTKPnvzn2iD5ujn+Q5O1JEpnA1WzzQcI2e1087vL8Ooy9PKvJcBRBpsAwxysKBWR4V0/2qwMSenhqICdXGFZB5PBZPy3fcD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716531374; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0BD/3bkbfti/sxehilpLJYRZElpAI3Ovze0/5RgjFlY=; b=WLV7FF7e8Pfn3MIVyYhKOjYpKduan4VqufXtdTgJhs4/2tx2sJ12DwMvulOCKcZ8XXujoyxiQsEmU8OGtr2a4FwKT6AyczaJVN6dq/wPOsYytizfU9aGEHs+LWniH4JSiQWevdw8R5aygbvqwJ1/28g1ysv86tiWCAG9BmBnRT4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171653137440481.97459933434129; Thu, 23 May 2024 23:16:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAODd-0003P4-UJ; Fri, 24 May 2024 02:15:57 -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 1sAODW-00032J-Lw for qemu-devel@nongnu.org; Fri, 24 May 2024 02:15:52 -0400 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAODO-0001U7-1w for qemu-devel@nongnu.org; Fri, 24 May 2024 02:15:50 -0400 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-24ca0876a83so292799fac.2 for ; Thu, 23 May 2024 23:15:40 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.31]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fcbea487sm516106b3a.107.2024.05.23.23.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 23:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1716531339; x=1717136139; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0BD/3bkbfti/sxehilpLJYRZElpAI3Ovze0/5RgjFlY=; b=eYWTorw32CmdIEEmzufpMx2LllFUwoK6j6F1NL961e/EbdfDwmsnR0YoFE6tdxxeqf BmGfiogNCzMBNQEITCxHJZDnaAGKlrb862tExJhFk2f9ba1lYfD/rC7Br6Zh0F/REHD5 dS4SnFYXhdtq+R1fbinD8exd/tZLoGcxl349JhFa789302xq+QhsekszJ3OVVQK5RzCd hMCejFEhFevWIK9XEQ0sgSIFiIKBgSuZkBa+QfszaefW4XflvFkBu/U7VCiIOpt17nKn xOM3FFKWx+DHrqZCpw9CWtfrArU202WCQd5YZEl5f+rm/dnmzjmgQ51WUS2+S1Ms4wSz /V9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716531339; x=1717136139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0BD/3bkbfti/sxehilpLJYRZElpAI3Ovze0/5RgjFlY=; b=Gduvmp/yymCXrOhrTXo1Qos2LF0uZ7c60eOAfKhb6dggT9es8epu1CD6meZxHAdH8D pWjNWTInPTF8wkQbsoeTkkpjwtPBnf11u726XhzW2zaOxkIUJbSFxK/RUS7KdY+U19MO 2bFLztGDFuAJbJrW8iSuMFhJJiADRDbPCPGMch8dVtdM5tbDBWC5N8zYcy1um7sIjduG n3FLkqXMnsTjPFWr4bYpAiIkN8qmnPmzwEpLUd31jBeMmQEXdqon5sOD7ivvG2bvVt5k m9hiG2nmZmM8yPKM6UWfYeAe7EXPbEvmp86lWGgwObPFCKVlj6eTTnFx7ktkph6rsCWi FGtw== X-Gm-Message-State: AOJu0Yx/n2VBS02uF8Sosj0asD7KXBaSbGesTDyCrhgzse3DhzdxIkj9 22PEbzM7ZeViVlHKzvujw7FTsLybVjnbEf1BxMfXzjyG+I2s/5Rtz5f5/3uBKY6fy7fP9YYjvpj XVEA= X-Google-Smtp-Source: AGHT+IG67OY2VscXOoo4si6QvsZohVhT+dLw5NF1CMa40glisTJpmqbX9JO8mHELJgvc13Mj3fdm0A== X-Received: by 2002:a05:6870:a70e:b0:24c:59f7:e840 with SMTP id 586e51a60fabf-24ca12039a1mr1413445fac.17.1716531338655; Thu, 23 May 2024 23:15:38 -0700 (PDT) From: Sunil V L To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , Laurent Vivier , Gerd Hoffmann , Alistair Francis , Sia Jee Heng , Haibo1 Xu , Anup Patel , Andrew Jones , Daniel Henrique Barboza , Peter Maydell , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei , Sunil V L Subject: [PATCH v2 11/12] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V Date: Fri, 24 May 2024 11:44:10 +0530 Message-Id: <20240524061411.341599-12-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240524061411.341599-1-sunilvl@ventanamicro.com> References: <20240524061411.341599-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::34; envelope-from=sunilvl@ventanamicro.com; helo=mail-oa1-x34.google.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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1716531376301100003 Content-Type: text/plain; charset="utf-8" Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis --- tests/qtest/bios-tables-test.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index c73174ad00..880435a5fa 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1935,6 +1935,29 @@ static void test_acpi_microvm_acpi_erst(void) } #endif /* CONFIG_POSIX */ =20 +static void test_acpi_riscv64_virt_tcg(void) +{ + test_data data =3D { + .machine =3D "virt", + .arch =3D "riscv64", + .tcg_only =3D true, + .uefi_fl1 =3D "pc-bios/edk2-riscv-code.fd", + .uefi_fl2 =3D "pc-bios/edk2-riscv-vars.fd", + .ram_start =3D 0x80000000ULL, + .scan_len =3D 128ULL * 1024 * 1024, + }; + + /* + * RHCT will have ISA string encoded. To reduce the effort + * of updating expected AML file for any new default ISA extension, + * use the profile rva22s64. + */ + test_acpi_one("-cpu rva22s64 -device virtio-blk-device,drive=3Dhd0 " + "-drive file=3Dtests/data/uefi-boot-images/bios-tables-t= est.riscv64.iso.qcow2,id=3Dhd0", + &data); + free_test_data(&data); +} + static void test_acpi_aarch64_virt_tcg(void) { test_data data =3D { @@ -2404,6 +2427,10 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/virt/viot", test_acpi_aarch64_virt_vi= ot); } } + } else if (strcmp(arch, "riscv64") =3D=3D 0) { + if (has_tcg && qtest_has_device("virtio-blk-pci")) { + qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg); + } } ret =3D g_test_run(); boot_sector_cleanup(disk); --=20 2.40.1