From patchwork Thu Nov 30 11:18:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhaotianrui X-Patchwork-Id: 171841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp315378vqy; Thu, 30 Nov 2023 03:31:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0QRfuWaw9d9PrV0NUT2eTxTaMn//KPqPdswPEYNd8YK/avK/kD1IT8RtxNbt9UXI9n3PA X-Received: by 2002:a17:90b:30cb:b0:27d:3f0c:f087 with SMTP id hi11-20020a17090b30cb00b0027d3f0cf087mr21713700pjb.25.1701343894935; Thu, 30 Nov 2023 03:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701343894; cv=none; d=google.com; s=arc-20160816; b=HjbjB850+CK7uMuk7KM+z2GAr3cM2MwesqPWybmWjymCK53YkKaEIIz/t/iTFd0kig Y4YSyFM37Bcw0lipaXYqG+uN/qpgEE1KtDRLjaM1dNQCjsKRnUXNRQTGSkHPyumuB+qL He9GPMwSynsj9pAzr/Qf/uVHiNxXAsCbATZwbpHZPRtbRwrYrL5NwqOWWB/UxqgEAtmD J2x1+hhkoAF3axT4O5yJsxFCdtDFrwCyDqEje+nH6V55IKU8xZZOiSIRwV6sLn318GxS Q12HgBV7fh5B6LP4IvHkUPzH9kyunK5hf8llTOkFPyrqVUTX8A/+aak10yolA1ugwuoY IHig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ntg9oa2mzJBdNaOdiBaAW6GU5jle3P/w0UVpexcDrYU=; fh=Qi8O4GPf+E9kHNNUfjv2vNMHhM7kTwYQ+uMwpaT6JZQ=; b=AAc/4mTBVCDwsfiHpl0gpa2exnpHY1v7FBqhywMTdklaeirBQiQGC58Dyw0Bsyb/wC BVmf0G5ZX2B0sOzvVaeAYj2yOBYWdY6g7i08QKAQMsJSYVi/VDGYEdxzTRJxyYXJsCQm huI+dPDvf1GJ2Eo5NUWbTJxy90VU44ZPI2sAECfLn2+6qPgmynjRGrF6rRkt4oOD77e+ Nzrbgz8hbaE9PQzDfcXXZz5mKv2RWms1y/r7nSgW4fGZwU/Cm8lJRWcBxVJoQ2Ny71g6 cb/SUT3/Mx1Df07k7ifySuuCkByIvbtefNvSC31e02zpKosVGYbJqEQVCIAMnv1OYF0r 06yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h11-20020a17090acf0b00b002839bc84a0esi3432601pju.139.2023.11.30.03.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 03:31:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A951F823B3ED; Thu, 30 Nov 2023 03:31:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345271AbjK3LbQ (ORCPT + 99 others); Thu, 30 Nov 2023 06:31:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345193AbjK3La7 (ORCPT ); Thu, 30 Nov 2023 06:30:59 -0500 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 710DD10DF; Thu, 30 Nov 2023 03:31:04 -0800 (PST) Received: from loongson.cn (unknown [10.2.5.185]) by gateway (Coremail) with SMTP id _____8Cxc_B2cmhlBeg9AA--.57539S3; Thu, 30 Nov 2023 19:31:02 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxG9xycmhlNblQAA--.47327S6; Thu, 30 Nov 2023 19:31:02 +0800 (CST) From: Tianrui Zhao To: Shuah Khan , Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Sean Christopherson Cc: Vishal Annapurve , Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev, Peter Xu , Vipin Sharma , maobibo@loongson.cn, zhaotianrui@loongson.cn Subject: [PATCH v5 4/4] KVM: selftests: Add test cases for LoongArch Date: Thu, 30 Nov 2023 19:18:04 +0800 Message-Id: <20231130111804.2227570-5-zhaotianrui@loongson.cn> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231130111804.2227570-1-zhaotianrui@loongson.cn> References: <20231130111804.2227570-1-zhaotianrui@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxG9xycmhlNblQAA--.47327S6 X-CM-SenderInfo: p2kd03xldq233l6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 03:31:32 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783988376059031418 X-GMAIL-MSGID: 1783988376059031418 There are some KVM common test cases supported by LoongArch: demand_paging_test dirty_log_perf_test dirty_log_test guest_print_test kvm_binary_stats_test kvm_create_max_vcpus kvm_page_table_test memslot_modification_stress_test memslot_perf_test set_memory_region_test And other test cases are not supported by LoongArch. For example, we do not support rseq_test, as the glibc do not support it. Signed-off-by: Tianrui Zhao Reviewed-by: Bibo Mao --- tools/testing/selftests/kvm/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index a5963ab9215..9d099d48013 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -65,6 +65,10 @@ LIBKVM_s390x += lib/s390x/ucall.c LIBKVM_riscv += lib/riscv/processor.c LIBKVM_riscv += lib/riscv/ucall.c +LIBKVM_loongarch += lib/loongarch/processor.c +LIBKVM_loongarch += lib/loongarch/ucall.c +LIBKVM_loongarch += lib/loongarch/exception.S + # Non-compiled test targets TEST_PROGS_x86_64 += x86_64/nx_huge_pages_test.sh @@ -202,6 +206,17 @@ TEST_GEN_PROGS_riscv += kvm_binary_stats_test SPLIT_TESTS += get-reg-list +TEST_GEN_PROGS_loongarch += demand_paging_test +TEST_GEN_PROGS_loongarch += dirty_log_perf_test +TEST_GEN_PROGS_loongarch += dirty_log_test +TEST_GEN_PROGS_loongarch += guest_print_test +TEST_GEN_PROGS_loongarch += kvm_binary_stats_test +TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus +TEST_GEN_PROGS_loongarch += kvm_page_table_test +TEST_GEN_PROGS_loongarch += memslot_modification_stress_test +TEST_GEN_PROGS_loongarch += memslot_perf_test +TEST_GEN_PROGS_loongarch += set_memory_region_test + TEST_PROGS += $(TEST_PROGS_$(ARCH_DIR)) TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH_DIR)) TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR))