From patchwork Thu Aug 29 11:31:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayan Kumar Halder X-Patchwork-Id: 13783035 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.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 BC9B2C83F06 for ; Thu, 29 Aug 2024 11:31:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.785669.1195152 (Exim 4.92) (envelope-from ) id 1sjdNF-0001M0-9b; Thu, 29 Aug 2024 11:31:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 785669.1195152; Thu, 29 Aug 2024 11:31:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjdNF-0001Lt-6X; Thu, 29 Aug 2024 11:31:33 +0000 Received: by outflank-mailman (input) for mailman id 785669; Thu, 29 Aug 2024 11:31:32 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjdNE-0001Lj-ML for xen-devel@lists.xenproject.org; Thu, 29 Aug 2024 11:31:32 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062e.outbound.protection.outlook.com [2a01:111:f403:2418::62e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3ba7db13-65fa-11ef-99a0-01e77a169b0f; Thu, 29 Aug 2024 13:31:30 +0200 (CEST) Received: from DM6PR13CA0011.namprd13.prod.outlook.com (2603:10b6:5:bc::24) by PH7PR12MB9073.namprd12.prod.outlook.com (2603:10b6:510:2eb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Thu, 29 Aug 2024 11:31:25 +0000 Received: from CY4PEPF0000E9CD.namprd03.prod.outlook.com (2603:10b6:5:bc:cafe::b2) by DM6PR13CA0011.outlook.office365.com (2603:10b6:5:bc::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14 via Frontend Transport; Thu, 29 Aug 2024 11:31:25 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9CD.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Thu, 29 Aug 2024 11:31:24 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 06:31:23 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 29 Aug 2024 06:31:23 -0500 Received: from xcbayankuma40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 29 Aug 2024 06:31:22 -0500 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3ba7db13-65fa-11ef-99a0-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Kwou0QZukpW9/yeY/Nsv7JHn/yRwdHhOdDjruPmrEaAhKDytHil4H2+3yi9Mmx+S7a9mb1p72b9gALLG6B1u5EBTztxrOTxhYGNfO1bLihjFN4t+DTgcZNZF996GfIjUhsvI6A9NGOcV8m9hk1kLuD4K36y1VhKrE6J6vGiC4h2yKdAySGS22X58W+bMAWqlxZ2vtnDHHW/6KYWwdo1iJUWaD6S48peV443fcUR3zaMQRgrTzRRecuB6pRFgdkvtlC4CdT7lzkStljt6OtbSl/Jv008w4af0eMOq0GOsuFG3fyT0SjxDWtFBMJbVlNqUSVWIu0IkgPnmUemAmkyWrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gm2POMBECsGV7z8vdKZQvlwhA36fQr6aLBAeMcMvOw8=; b=atGIA5w3+z3PvRd8Oau1FSqjg1Z+ahCzOjJ3czvhMzA/GmuB/0jvg+KXdoLwikA+Nf4bhStyYS5CtMoJsmaV/J/33Fo/RaMftH8gXIsm0j2NS6v8Sj2ypvFuS4vnh/e/QaRsVSAWlJv2dDtqaccJ1vGS81Q+sMQDKp2JprGWrebQzCQvj+hZBeygLTVpSK9GlkJcRAqjIFF8wtc6MPQC67GI7SkqDBDAY7j/yfhrJvXHvP9Yu1AL4aulG6VanvkR3hO34OSQuHSt4kQ4f02jEcAVnjjHroCGWa6mPOLPB4mRU34grRwKR1nqnyIsp0mxg/kqxYRHqQGvYuD+NW97vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gm2POMBECsGV7z8vdKZQvlwhA36fQr6aLBAeMcMvOw8=; b=u9GUA2IHZwRzfD2fw5ptln6mAH0RiPRzzN9G9JuusuYLJIsR+0NOXcOgrXffj8Qco2NBRYFmoYylCYUG3/GDN6Uw6nDc4nMD2KhXBH4+Q6pJoV6MHANOfNJ8lHjpnXi5VpRfnKAevEmU1TpHK+RPIRVERTDRF3+g1vyIb6QaTms= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Ayan Kumar Halder To: CC: Michal Orzel , Stefano Stabellini , Bertrand Marquis , "Ayan Kumar Halder" , Artem Mygaiev , Hisao Munakata Subject: [PATCH v2] docs: fusa: Add requirements for generic timer Date: Thu, 29 Aug 2024 12:31:20 +0100 Message-ID: <20240829113120.3980270-1-ayan.kumar.halder@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9CD:EE_|PH7PR12MB9073:EE_ X-MS-Office365-Filtering-Correlation-Id: 62cc6915-9716-4bbc-8546-08dcc81e1d3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: alh1WRuvGe58qx7RN8CRSG9uvjraUDTkAWAkwrO5ThgGqCGWheWbBPraUqBqxNO+VO0PyBr36VDglCevlKDPLhmLHJCRe9p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qxVu0ngA2gXSQ0WNSxD5QZ0qxj43cATbEHc3zZnCv7+LI8A5ZQRi1mO8z1XKY6sS6cPpu5CdAumcbNrridQBYdub8kJeAn6knz+PUT44PYFgAERsuiHS96xh3LFuMMe5CC02Y6Aqizsbu62phSeRrCVIprMVj9pirL5TwkCRzSei1x1GSSaYNjZ+VdFlpkQWKaPTi+N1O6hrLldDzQwc/TuluLRDLR0FrczcGHA8OsbvYh5ojbn/RQe6k/ClBAgGMZKBcI7lvrhPLWTmNfuQZ9jtVCzhwZOsPdijaBbwV8/yXfKdtQOKj X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 11:31:24.2947 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62cc6915-9716-4bbc-8546-08dcc81e1d3e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9CD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9073 From: Michal Orzel Add the requirements for the use of generic timer by a domain Signed-off-by: Michal Orzel Signed-off-by: Ayan Kumar Halder Reviewed-by: Stefano Stabellini Reviewed-by: Bertrand Marquis --- Changes from - v1 - 1. Fixed some wordings as suggested in v1. 2. Removed the comments which mentions Domain specific usage details. .../reqs/design-reqs/arm64/generic-timer.rst | 123 ++++++++++++++++++ docs/fusa/reqs/index.rst | 3 + docs/fusa/reqs/intro.rst | 3 +- docs/fusa/reqs/market-reqs/reqs.rst | 34 +++++ docs/fusa/reqs/product-reqs/arm64/reqs.rst | 23 ++++ 5 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 docs/fusa/reqs/design-reqs/arm64/generic-timer.rst create mode 100644 docs/fusa/reqs/market-reqs/reqs.rst create mode 100644 docs/fusa/reqs/product-reqs/arm64/reqs.rst diff --git a/docs/fusa/reqs/design-reqs/arm64/generic-timer.rst b/docs/fusa/reqs/design-reqs/arm64/generic-timer.rst new file mode 100644 index 0000000000..f2a0cd7fb8 --- /dev/null +++ b/docs/fusa/reqs/design-reqs/arm64/generic-timer.rst @@ -0,0 +1,123 @@ +.. SPDX-License-Identifier: CC-BY-4.0 + +Generic Timer +============= + +The following are the requirements related to ARM Generic Timer [1] interface +exposed by Xen to Arm64 domains. + +Probe the Generic Timer device tree node from a domain +------------------------------------------------------ + +`XenSwdgn~arm64_generic_timer_probe_dt~1` + +Description: +Xen shall generate a device tree node for the Generic Timer (in accordance to +ARM architected timer device tree binding [2]) in the domain device tree. + +Rationale: + +Comments: +Domains can detect the presence of the Generic Timer device tree node. + +Covers: + - `XenProd~emulated_timer~1` + +Read system counter frequency +----------------------------- + +`XenSwdgn~arm64_generic_timer_read_freq~1` + +Description: +Xen shall expose the frequency of the system counter to the domains in +CNTFRQ_EL0 register and/or domain device tree's "clock-frequency" property. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +Access CNTKCTL_EL1 system register from a domain +------------------------------------------------ + +`XenSwdgn~arm64_generic_timer_access_cntkctlel1~1` + +Description: +Xen shall expose Counter-timer Kernel Control register (CNTKCTL_EL1) to the +domains. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +Access virtual timer from a domain +---------------------------------- + +`XenSwdgn~arm64_generic_timer_access_virtual_timer~1` + +Description: +Xen shall expose the virtual timer registers (CNTVCT_EL0, CNTV_CTL_EL0, +CNTV_CVAL_EL0, CNTV_TVAL_EL0) to the domains. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +Access physical timer from a domain +----------------------------------- + +`XenSwdgn~arm64_generic_timer_access_physical_timer~1` + +Description: +Xen shall expose physical timer registers (CNTPCT_EL0, CNTP_CTL_EL0, +CNTP_CVAL_EL0, CNTP_TVAL_EL0) to the domains. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +Trigger the virtual timer interrupt from a domain +------------------------------------------------- + +`XenSwdgn~arm64_generic_timer_trigger_virtual_interrupt~1` + +Description: +Xen shall generate virtual timer interrupts to domains when the virtual timer +condition is met. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +Trigger the physical timer interrupt from a domain +-------------------------------------------------- + +`XenSwdgn~arm64_generic_timer_trigger_physical_interrupt~1` + +Description: +Xen shall generate physical timer interrupts to domains when the physical timer +condition is met. + +Rationale: + +Comments: + +Covers: + - `XenProd~emulated_timer~1` + +[1] Arm Architecture Reference Manual for A-profile architecture, Chapter 11 +[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml diff --git a/docs/fusa/reqs/index.rst b/docs/fusa/reqs/index.rst index 78c02b1d9b..183f183b1f 100644 --- a/docs/fusa/reqs/index.rst +++ b/docs/fusa/reqs/index.rst @@ -7,3 +7,6 @@ Requirements documentation :maxdepth: 2 intro + market-reqs + product-reqs + design-reqs/arm64 diff --git a/docs/fusa/reqs/intro.rst b/docs/fusa/reqs/intro.rst index d67b18dd9f..245a219ff2 100644 --- a/docs/fusa/reqs/intro.rst +++ b/docs/fusa/reqs/intro.rst @@ -55,7 +55,8 @@ Title of the requirement be 'XenMkt', 'XenProd' or 'XenSwdgn' to denote market, product or design requirement. name - This denotes name of the requirement. In case of architecture specific - requirements, this starts with the architecture type (ie x86_64, arm64). + requirements, this starts with the architecture type (eg x86_64, arm64) + followed by component name (eg generic_timer) and action (eg read_xxx). revision number - This gets incremented each time the requirement is modified. diff --git a/docs/fusa/reqs/market-reqs/reqs.rst b/docs/fusa/reqs/market-reqs/reqs.rst new file mode 100644 index 0000000000..9c98c84a9a --- /dev/null +++ b/docs/fusa/reqs/market-reqs/reqs.rst @@ -0,0 +1,34 @@ +.. SPDX-License-Identifier: CC-BY-4.0 + +Functional Requirements +======================= + +Run Arm64 VMs +------------- + +`XenMkt~run_arm64_vms~1` + +Description: +Xen shall run Arm64 VMs. + +Rationale: + +Comments: + +Needs: + - XenProd + +Provide timer to the VMs +------------------------ + +`XenMkt~provide_timer_vms~1` + +Description: +Xen shall provide a timer to a VM. + +Rationale: + +Comments: + +Needs: + - XenProd diff --git a/docs/fusa/reqs/product-reqs/arm64/reqs.rst b/docs/fusa/reqs/product-reqs/arm64/reqs.rst new file mode 100644 index 0000000000..7aa3eeab6a --- /dev/null +++ b/docs/fusa/reqs/product-reqs/arm64/reqs.rst @@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: CC-BY-4.0 + +Domain Creation And Runtime +=========================== + +Emulated Timer +-------------- + +`XenProd~emulated_timer~1` + +Description: +Xen shall grant access to "Arm Generic Timer" for the domains. + +Rationale: + +Comments: + +Covers: + - `XenMkt~run_arm64_vms~1` + - `XenMkt~provide_timer_vms~1` + +Needs: + - XenSwdgn