[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/2] docs: fusa: Define the requirements for XEN_VERSION hypercall.


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 21 May 2025 12:02:09 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=amd.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=uOEPHl1FhvYGERFHBgtJVoJZVRe0UGt8udpoGR2MPAk=; b=tjgz1KtO0RsUpubXKr1HSOmYxTD9bEA/8c9ienXwST/oXuoa09uUfb1phtDuozKuKEfXyQbBtrrNLj0TBoOuxE1g8dmkL3Un2IawNVw4SodNCNKHfouea1QIhie5SrMLimpC+k6Wtq2VBuatSnkU9UBIh+UO2D9ttWBPQI081knl0pRG7ekHfG9n5l/pfUSEuyNKxZCmy/LhalCrnA8+QaTPsJYfp4ppF3vg7AnzALCd7u/5ZdkqKPZoUVmvpTODnY1idOgfo79/2eG4ahXquERNWRy4NnDA9DrlhEx6iCf7NzyAVHVLDYpB3u/ZpAAZPLefMjCc010pg1Eyxq4gsA==
  • 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=uOEPHl1FhvYGERFHBgtJVoJZVRe0UGt8udpoGR2MPAk=; b=FjETdrnivfLyzPoTPO77GfmAGgm4YhPl3VImWmr1iZuuxlSQ8LB3YVCKbKgYg3NCIKXz/22kZKiD18ZKbPaGW2ODwJl+CC1QYfPGTECctzZtRB/S6jL9n89lDauROH5QQi4utu347clYUWImT5YjRmwcXtq5LUL0OMbprp1j6MVs/W4S1qSriR7QsElsY4bQ3TiPlSZLTekqSNwpiLo8UIRM6er+FZJ0OdyZZZ0r+kvwF11L7x/S1wgkaMa6HFtutFcqau4/0BbUhHnsWjHMCtXAJfS2JxcwkzOWJy7S+AilH9TuYAAl4r795YvtmCOhwONWTVW6VP2MXt9gFX0dDA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Yorev5a9wW0TFMwcld0RsP8P+JK+yrDMyX8uNcmDNPkxYGNflTKft3hNjxfbpQX1IOtVzAN1c3IL21dfF/3+eYYPD+wz8Eb+bgPyINip9WPfsM444jP7gXkIk3BcdAa20DFw1gc7O9p0AxD/6x1Ivu712uL3lOxhKMO6nH03AEy0zJRv1KxSU7qjRV1vSRQ/QWboFHpYt4VOg6GZCLNWoeVj8VUls7sf9nZ4qrZrC11quOINMoNAcb2NP0sSbLnGfwuAkAiE40ugoeU/hBf3Bmyz1ZH2Kd+MvUQgBPjLX5pwl9ctfgBYCTe1K7/GNJXJaaYaeLan1+dKis9Tv7QBGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bjjWOjvDqJh/Mc+dnV+Yw9bnFKBP6h2bkyitQHjN+ljeUCpwBoYgu10bkbl63y7i7DxVUG7nkqH2lTFQr2NYH8LPO/Gj14q0aru6nXzyf4yDJ8I55XlCHdKe0o6y+UeB4HhEOCBxZt2ohbIqaME6PJ4oi78gs67kI+OdwxftFYn1gjHY4OglmfbYmtIaL9s//JZDX0ACPIRuwftyziXoPhElhwN2ll5rKZb/Zt1eJKsMk3u5lveY6h6cK59JSJ6BoPt6uDkTQExkGyu3Jzwrrjv8mMJr2sZiL2v3O1HhUwEa7U4W/my64xwio7hhn9jBQrRyN1qKNo9jhoLDuL2MnA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>
  • Delivery-date: Wed, 21 May 2025 12:02:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHbwNT/SvCvWvdWh0CT9yLy3QlhobPdDqQA
  • Thread-topic: [PATCH v3 1/2] docs: fusa: Define the requirements for XEN_VERSION hypercall.

Hi Ayan,

> On 9 May 2025, at 13:24, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> wrote:
> 
> Define the requirements which are common for all the commands for XEN_VERSION
> hypercall.
> 
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> Changes from -
> 
> v1 - 1. Fixed `XenProd~version_hyp_ret_val~1` requirement as Xen does not 
> return
> 0 for success in all the cases.
> 2. Reworded the requirements so as to write them from Xen's perspective (not
> domain's perspective).
> 
> v2 - 1. Specified the register details.
> 2. Specified the type of buffer. 
> 
> .../fusa/reqs/design-reqs/arm64/hypercall.rst | 58 +++++++++++++++++++
> docs/fusa/reqs/index.rst                      |  2 +
> docs/fusa/reqs/market-reqs/reqs.rst           | 16 +++++
> .../reqs/product-reqs/version_hypercall.rst   | 43 ++++++++++++++
> 4 files changed, 119 insertions(+)
> create mode 100644 docs/fusa/reqs/design-reqs/arm64/hypercall.rst
> create mode 100644 docs/fusa/reqs/product-reqs/version_hypercall.rst
> 
> diff --git a/docs/fusa/reqs/design-reqs/arm64/hypercall.rst 
> b/docs/fusa/reqs/design-reqs/arm64/hypercall.rst
> new file mode 100644
> index 0000000000..f00b0b00f9
> --- /dev/null
> +++ b/docs/fusa/reqs/design-reqs/arm64/hypercall.rst
> @@ -0,0 +1,58 @@
> +.. SPDX-License-Identifier: CC-BY-4.0
> +
> +Hypercall
> +=========
> +
> +Instruction
> +-----------
> +
> +`XenSwdgn~arm64_hyp_instr~1`
> +
> +Description:
> +Xen shall treat domain hypercall exception as hypercall requests.

This really reads weirdly.
Maybe: Xen shall treat domain hvc instruction execution as hypercall requests.

Then you can add a comment to explain that this is detected through a specific 
exception.

Also this is not completely true as hvc is also used in other scenarios:
- PSCI calls
- Firmware calls

So i would put the 0xEA1 value as part of the requirement.

> +
> +Rationale:
> +
> +Comments:
> +Hypercall is one of the communication mechanism between Xen and domains.
> +Domains use hypercalls for various requests to Xen.
> +Domains use 'hvc #0xEA1' instruction to invoke hypercalls.
> +
> +Covers:
> + - `XenProd~version_hyp_first_param~1`
> + - `XenProd~version_hyp_second_param~1`
> +
> +Parameters
> +----------
> +
> +`XenSwdgn~arm64_hyp_param~1`
> +
> +Description:
> +Xen shall use the first five cpu core registers to obtain the arguments for
> +domain hypercall requests.

Why not say x0 to x4 registers instead ? You use x16 after anyway

> +
> +Rationale:
> +
> +Comments:
> +Xen shall read the first register for the first argument, second register for
> +the second argument and so on.
> +
> +Covers:
> + - `XenProd~version_hyp_first_param~1`
> + - `XenProd~version_hyp_second_param~1`
> +
> +Hypercall number
> +----------------
> +
> +`XenSwdgn~arm64_hyp_num~1`
> +
> +Description:
> +Xen shall read x16 to obtain the hypercall number.
> +
> +Rationale:
> +
> +Comments:
> +
> +Covers:
> + - `XenProd~version_hyp_first_param~1`
> + - `XenProd~version_hyp_second_param~1`
> diff --git a/docs/fusa/reqs/index.rst b/docs/fusa/reqs/index.rst
> index 1088a51d52..d8683edce7 100644
> --- a/docs/fusa/reqs/index.rst
> +++ b/docs/fusa/reqs/index.rst
> @@ -10,5 +10,7 @@ Requirements documentation
>    market-reqs/reqs
>    product-reqs/reqs
>    product-reqs/arm64/reqs
> +   product-reqs/version_hypercall
>    design-reqs/arm64/generic-timer
>    design-reqs/arm64/sbsa-uart
> +   design-reqs/arm64/hypercall
> diff --git a/docs/fusa/reqs/market-reqs/reqs.rst 
> b/docs/fusa/reqs/market-reqs/reqs.rst
> index 2d297ecc13..0e29fe5362 100644
> --- a/docs/fusa/reqs/market-reqs/reqs.rst
> +++ b/docs/fusa/reqs/market-reqs/reqs.rst
> @@ -79,3 +79,19 @@ Comments:
> 
> Needs:
>  - XenProd
> +
> +Version hypercall
> +-----------------
> +
> +`XenMkt~version_hypercall~1`
> +
> +Description:
> +Xen shall provide an interface for the domains to retrieve Xen's version, 
> type
> +and compilation information.

I would say hypercall instead of interface here

> +
> +Rationale:
> +
> +Comments:
> +
> +Needs:
> + - XenProd
> diff --git a/docs/fusa/reqs/product-reqs/version_hypercall.rst 
> b/docs/fusa/reqs/product-reqs/version_hypercall.rst
> new file mode 100644
> index 0000000000..400d51bbeb
> --- /dev/null
> +++ b/docs/fusa/reqs/product-reqs/version_hypercall.rst
> @@ -0,0 +1,43 @@
> +.. SPDX-License-Identifier: CC-BY-4.0
> +
> +Version hypercall
> +=================
> +
> +First Parameter
> +---------------
> +
> +`XenProd~version_hyp_first_param~1`
> +
> +Description:
> +Xen shall treat the first argument (as an integer) to denote the command 
> number
> +for the hypercall.

I would be more precise and say x0 value.

Also "integer" is unspecified, use a more specific type definition (32/64 bit 
signed/unsigned integer).

> +
> +Rationale:
> +
> +Comments:
> +
> +Covers:
> + - `XenMkt~version_hypercall~1`
> +
> +Needs:
> + - XenSwdgn
> +
> +Second Parameter
> +----------------
> +
> +`XenProd~version_hyp_second_param~1`
> +
> +Description:
> +Xen shall treat the second argument as a virtual address (mapped as Normal
> +Inner Write-Back Outer Write-Back Inner-Shareable) to buffer in domain's
> +memory.

You should say "guest virtual address" to be more precise.

> +
> +Rationale:
> +
> +Comments:
> +
> +Covers:
> + - `XenMkt~version_hypercall~1`
> +
> +Needs:
> + - XenSwdgn
> -- 
> 2.25.1
> 

Cheers
Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.