Message ID | cover.1705916069.git.haibo1.xu@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2464908dyb; Mon, 22 Jan 2024 01:45:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IF47HryRu8xHn2B4HKMGkmNcJxsZAY2GILC8MWBzWJi/js9Bzc1WRANbLdv+ipjSc48Fnu6 X-Received: by 2002:a17:906:5956:b0:a30:6675:d038 with SMTP id g22-20020a170906595600b00a306675d038mr746199ejr.21.1705916735766; Mon, 22 Jan 2024 01:45:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705916735; cv=pass; d=google.com; s=arc-20160816; b=D6pXlw9dcfy7L8Y1cRobYnkf1AYooZcifpcM+MAzfyIp278naskPiXRjseKP6+SoA0 oUHRxFyBax34fbQlFDu5laamkmxllmmqfaSFwZtLDxDn8Ru6rwduuFRup38U5q0rBUE9 oxKh6jvOTaUsMYTFHkXFNygMeEFiJQxn9uAo50puW281ZjQceddn9R5uFHDQIIpk3AN4 a4xYRhFzS2gtGoxfbGkj6isPPBEJgGKfUos7PszHPJXl0ksrPxoqB8o3Kn9VILkqaXAy c+6+W4BupenSt08ceX3SFeg78/1KWwBQPQ9KjTaikNpp8hENhagzDt4ZKsM/0wOnC8Dy wK4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=HLiEwz2wvhEKBWBum51oQJhi74ef/nfh3uiSfkgGfi0=; fh=wN/A2Ncq/v6I30awVIVwLdLCsxYF2dEAk19y2Cn+eYM=; b=DSYp1Uqv+wVfrbhmO4P0W9dH4LLdLAUYsBPa+vZqg+ZTDSII3Gr8tk/jn9zC1wP4ef kzD6w0BNU/Rts/LW+bmcCnwYggkVujCHbRzr6i62MrYSTktooPqA0yqsb9IkdA8r3hOV pHA7nwLMBlosG5Dn+0I7Fwr1tWO9WSyYlKdHDhC22LvZs72DhWw/AOj00xSv2r5jAs7q Tm+AsPuc3rR6HxA7YMGw3/oV4HedM8VX2gER7ABEgnea4qPh3TL3jUhyyd/eCpiwOmQB Jp9Ruw6SJj6tbqOh0uA46Tzr6uLwUs/oF0h3EMzPFQ8bTuaqcp/wbt5JI2jUYJ6jgctK b/Hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JMQnyxl9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h9-20020a1709066d8900b00a29e983e09asi10551521ejt.398.2024.01.22.01.45.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 01:45:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JMQnyxl9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32649-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 642701F25414 for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 09:45:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 755DF39FE8; Mon, 22 Jan 2024 09:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JMQnyxl9" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 155B93A1A2; Mon, 22 Jan 2024 09:45:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705916703; cv=none; b=DGVciwSUFHnngmfTRbRBLueSKWoSZVLAagVxdlN5q00p4bBtQlHdofGPiU8Qb9SoucVwQfktfdVq+fXRm5nyJOxu0yR5Zsxwzu8MAe6ZpNUq0Qrmt8WriJPjn9hqR4f5wGXbFHOzq0QjpOjZNwCZ2gWrnVNE3vAzQJU5atTTWWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705916703; c=relaxed/simple; bh=t4I3ga6CJht5tl0WmnhE1Xni4i5mXbwGq8WdKx7/4Ag=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=forTIN2kpKzIkzIdR0C8qkR1z1ddZt5sFmNt/eu/A+NMvA73d+dkzqMNE9KBDwSEdClDQazVTfQtTFuWn3AY7XseQz9ta3vt7wJ621tulFioEiynLXnabuOsAy8nuIJPVMmcUfAY/ZqugueJLTAIiJ13eR7g9jDvjdrSXPnSSac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JMQnyxl9; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705916702; x=1737452702; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=t4I3ga6CJht5tl0WmnhE1Xni4i5mXbwGq8WdKx7/4Ag=; b=JMQnyxl927QdETq8CXDQp3cJIojE1tLvAR8vTFmHn7wAzcjd5s8u1jOF bodUgC9+EwrZA9nm6NC+uHHYsEUnRZZS3vFdriz4eBl4golC+1tsMeZaS AV1l6T/YTWRDnhEzTR36Cu8kDWGFXzlxHSl8xz+4DTRbyF8qVLwhW9ymY sC8XGi0beKISd0AVX9LS+O5FZeDAJO30BtbTtNeFASy4LudGNe8tYUzzf MP88YtnkcsnlJE6zDId+wnyrgKIYL7rNnwUqMFkopp+baGKi3o9YRbgu+ q5rkC+8fPJFNFk3xAS8eKW2ZVJzvJwLYGaMfDQmYJUBCrCC4TYYTKCyLE g==; X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="22641468" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="22641468" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:45:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="778535212" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="778535212" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:44:50 -0800 From: Haibo Xu <haibo1.xu@intel.com> To: Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com, Haibo Xu <haibo1.xu@intel.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Paolo Bonzini <pbonzini@redhat.com>, Shuah Khan <shuah@kernel.org>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Guo Ren <guoren@kernel.org>, Conor Dooley <conor.dooley@microchip.com>, Mayuresh Chitale <mchitale@ventanamicro.com>, wchen <waylingii@gmail.com>, Greentime Hu <greentime.hu@sifive.com>, Jisheng Zhang <jszhang@kernel.org>, Samuel Holland <samuel@sholland.org>, Minda Chen <minda.chen@starfivetech.com>, Sean Christopherson <seanjc@google.com>, Peter Xu <peterx@redhat.com>, Like Xu <likexu@tencent.com>, Vipin Sharma <vipinsh@google.com>, Thomas Huth <thuth@redhat.com>, Aaron Lewis <aaronlewis@google.com>, Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests Date: Mon, 22 Jan 2024 17:58:30 +0800 Message-Id: <cover.1705916069.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788783346838774027 X-GMAIL-MSGID: 1788783346838774027 |
Series |
RISCV: Add kvm Sstc timer selftests
|
|
Message
Haibo Xu
Jan. 22, 2024, 9:58 a.m. UTC
The RISC-V arch_timer selftests is used to validate Sstc timer functionality in a guest, which sets up periodic timer interrupts and check the basic interrupt status upon its receipt. This KVM selftests was ported from aarch64 arch_timer and tested with Linux v6.7-rc8 on a Qemu riscv64 virt machine. --- Changed since v4: * Rebased to Linux 6.7-rc8 * Added new patch(2/12) to clean up the data type in struct test_args * Re-ordered patch(11/11) in v4 to patch(3/12) * Changed the timer_err_margin_us type from int to uint32_t Haibo Xu (11): KVM: arm64: selftests: Data type cleanup for arch_timer test KVM: arm64: selftests: Enable tuning of error margin in arch_timer test KVM: arm64: selftests: Split arch_timer test code KVM: selftests: Add CONFIG_64BIT definition for the build tools: riscv: Add header file csr.h tools: riscv: Add header file vdso/processor.h KVM: riscv: selftests: Switch to use macro from csr.h KVM: riscv: selftests: Add exception handling support KVM: riscv: selftests: Add guest helper to get vcpu id KVM: riscv: selftests: Change vcpu_has_ext to a common function KVM: riscv: selftests: Add sstc timer test Paolo Bonzini (1): selftests/kvm: Fix issues with $(SPLIT_TESTS) tools/arch/riscv/include/asm/csr.h | 541 ++++++++++++++++++ tools/arch/riscv/include/asm/vdso/processor.h | 32 ++ tools/testing/selftests/kvm/Makefile | 27 +- .../selftests/kvm/aarch64/arch_timer.c | 295 +--------- tools/testing/selftests/kvm/arch_timer.c | 259 +++++++++ .../selftests/kvm/include/aarch64/processor.h | 4 - .../selftests/kvm/include/kvm_util_base.h | 9 + .../selftests/kvm/include/riscv/arch_timer.h | 71 +++ .../selftests/kvm/include/riscv/processor.h | 65 ++- .../testing/selftests/kvm/include/test_util.h | 2 + .../selftests/kvm/include/timer_test.h | 45 ++ .../selftests/kvm/lib/riscv/handlers.S | 101 ++++ .../selftests/kvm/lib/riscv/processor.c | 87 +++ .../testing/selftests/kvm/riscv/arch_timer.c | 111 ++++ .../selftests/kvm/riscv/get-reg-list.c | 11 +- 15 files changed, 1353 insertions(+), 307 deletions(-) create mode 100644 tools/arch/riscv/include/asm/csr.h create mode 100644 tools/arch/riscv/include/asm/vdso/processor.h create mode 100644 tools/testing/selftests/kvm/arch_timer.c create mode 100644 tools/testing/selftests/kvm/include/riscv/arch_timer.h create mode 100644 tools/testing/selftests/kvm/include/timer_test.h create mode 100644 tools/testing/selftests/kvm/lib/riscv/handlers.S create mode 100644 tools/testing/selftests/kvm/riscv/arch_timer.c
Comments
On Mon, 05 Feb 2024 13:10:26 +0000, Haibo Xu <xiaobo55x@gmail.com> wrote: > > Hi Marc, > > Could you help review the first 3 patches in this series? For these 3 patches: Reviewed-by: Marc Zyngier <maz@kernel.org> Thanks, M.