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

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


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 28 Feb 2025 07:54:52 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org 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=gKqdTb8kcwuCt3olRZ0+RPtBsCy7U1eHRPKIA8GF9DY=; b=c8ESMKK3sUA00TR3iAUlEIUlaaBUQERMpPlw9LIhAresanEaMRxWtvse26xpTw23FUwkkvO44K/VrxbTzDdbmX/4INK5xPYor2KHapqMnDYLDf195ES42ESOSYQJ7Jf7+jmzCOqx1Ojam431xCefYLG3TV8OtJ8eaAEtLUzbtXTRAauZg3/W3TEQETNV3OSn0MPQhMwWVipymiHfl/Av9z5C7SFxqoiaNlRQV9ddRZhkN7E8fWYdh07NSWY9nVKIFE4ZRG+uxDVYOowMVq7H/TDV7tYDuQXWyTKxwRh0ypqDvtiupBFo+n6cqe8txjA5E3YMGNKerEIKv/2RlSb3YA==
  • 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=gKqdTb8kcwuCt3olRZ0+RPtBsCy7U1eHRPKIA8GF9DY=; b=p+0jxLM3Lni6PVURuGXWf+u4ZmiUAGHfVk9CS4nxNtyqDwHz9k3w0u4BF4lN5dDFN4waNZBWdiXPzianNmQ/HRkCN81dYa5jeHKoprvJ9lujUZdqGTgEK71NFxeFZkZtmMqgClW1iP1gDEI2lqsKt62/uksnnyOz7q6d13U/JSUVRhoiVOmbf0PnbnNdfWEc9dPF0wePQicDFZoYCuJ3B+biNfWYKlpr72slLUEuFAfgR76UBP2UOw1VxdiwgQieR0svUhEv11GfwzcnruWung6v+T4a7ME3P1LTcVvKA2XTOSj6cHoYAdo82AG9p/73Oz9+e9bMgjxP48mWjpm6nw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=oq9V5jwi3iZPNSeSQwK9q7W20Y+lP4WgPcVlruqZSjsUlUaPZfN+5nlyoF3Cm2pzr9xenog+3rSwX+ztXqNpEYVIKJQeUgLvhpb799s+8Qzy474aXgNCe/p4mrrUd1HxMwE6EtqOC0MvjE2NMSIg03hXTU48ZrAZiiQWZcUurAlGqSmpDOxsSRpVaqjFpPFEtADa0SEDQW0j+wZRFCrTTB0R2udwG/RfcBOUE8RrjAd0RIu6HiLl2udx651QGdrC/f8v0tafydEFGXu7+eXbnFRs5K4SWBtOS++p1zlzN5zZyTkuBJGqD1/Y80UXUmXLVVf8ES7M1Xu6mvGyLJggIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oj+4NeWtDS4G1g4fDAKzidGdlyblsWMGZbP+K+GbQEXNPttMb9w/3pNasbCiBolc28W5zuEDmKczI7rhB/2lGN4EzsnbUwtsE6GKO64eIh0ZdwUZek7Zr6W63c5e6YuFzdozfM/YDuP7bdcMgdvj1r3rNIx7p5e+SS3XuTjbeTJezvwGhFbYGyZTC/PLiENeQEn4jxwbbNSvfE/EATasQIrLWcIu41owpPIPt6XnlWBrZ1ABWx0NfjuYzJvZ5n1BZUIEVSKnIcCPJEPQRIYFZmpyU88XFeEq9o0PrBuws5UC1ag1E8nz97jy9LZhqociii9BPuse7/a0KKIahAjE4g==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>
  • Delivery-date: Fri, 28 Feb 2025 07:55:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbiSmfhnajI8fAUU6893mrw5oGSLNbZAUAgAAlYACAANBTgA==
  • Thread-topic: [PATCH v2 1/2] docs: fusa: Define the requirements for XEN_VERSION hypercall.

Hi Ayan,

> On 27 Feb 2025, at 20:29, Ayan Kumar Halder <ayankuma@xxxxxxx> wrote:
> 
> 
> On 27/02/2025 17:15, Bertrand Marquis wrote:
>> Hi Ayan,
> 
> Hi Bertrand,
> 
> I have just some clarifications.
> 
>> 
>>> On 27 Feb 2025, at 16:09, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> 
>>> wrote:
>>> 
>>> In the current patch, we have defined the requirements which are common for
>>> all the commands.
>>> 
>>> 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).
>>> 
>>> .../fusa/reqs/design-reqs/arm64/hypercall.rst | 55 +++++++++++++++++
>>> docs/fusa/reqs/index.rst                      |  2 +
>>> docs/fusa/reqs/market-reqs/reqs.rst           | 16 +++++
>>> .../reqs/product-reqs/version_hypercall.rst   | 61 +++++++++++++++++++
>>> 4 files changed, 134 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..ffd883260c
>>> --- /dev/null
>>> +++ b/docs/fusa/reqs/design-reqs/arm64/hypercall.rst
>>> @@ -0,0 +1,55 @@
>>> +.. SPDX-License-Identifier: CC-BY-4.0
>>> +
>>> +Hypercall
>>> +=========
>>> +
>>> +Instruction
>>> +-----------
>>> +
>>> +`XenSwdgn~arm64_hyp_instr~1`
>>> +
>>> +Description:
>>> +Xen shall treat domain hypercall exception as hypercall requests.
>>> +
>>> +Rationale:
>>> +
>>> +Comments:
>>> +Hypercall is one of the communication mechanism between Xen and domains.
>>> +Domains use hypercalls for various requests to Xen.
>>> +Domains use 'hvc' 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 x0 to read the first parameter, x1 for second parameter and 
>>> so
>>> +on, for domain hypercall requests.
>>> +
>>> +Rationale:
>>> +
>>> +Comments:
>>> +
>>> +Covers:
>>> + - `XenProd~version_hyp_first_param~1`
>>> + - `XenProd~version_hyp_second_param~1`
>>> +
>>> +Return value
>>> +------------
>>> +
>>> +`XenSwdgn~arm64_ret_val~1`
>>> +
>>> +Description:
>>> +Xen shall store the return value in x0 register.
>>> +
>>> +Rationale:
>>> +
>>> +Comments:
>>> +
>>> +Covers:
>>> + - `XenProd~version_hyp_ret_val~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.
>>> +
>>> +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..03221f70c3
>>> --- /dev/null
>>> +++ b/docs/fusa/reqs/product-reqs/version_hypercall.rst
>>> @@ -0,0 +1,61 @@
>>> +.. 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.
>> You speak of argument here and parameter earlier.
>> I would rephrase to: the first argument of an hypercall exception as the 
>> command number for the hypercall.
> 
> Ack
> 
> Should I do this everywhere ?
> 
> s/parameter/argument
> 
> That would make it consistent.

Yes definitely 

> 
>> 
>>> +
>>> +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 to buffer in 
>>> domain's
>>> +memory.
>>> +
>> Same here on argument vs parameter.
>> 
>>> +Rationale:
>>> +
>>> +Comments:
>>> +
>>> +Covers:
>>> + - `XenMkt~version_hypercall~1`
>>> +
>>> +Needs:
>>> + - XenSwdgn
>>> +
>>> +Return Value
>>> +------------
>>> +
>>> +`XenProd~version_hyp_ret_val~1`
>>> +
>>> +Description:
>>> +In case the hypercall fails, Xen shall return one of the error codes 
>>> defined
>>> +in 
>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/errno.h.
>> This is a very imprecise req as it does not states what can fail and what 
>> should be returned exactly.
>> Do we want to be that generic ? if yes then this might be a requirement 
>> valid for any hypercall.
> 
> Yes, you are correct.
> 
> I am thinking of pushing this further up ie have this requirement at market 
> level and leave it **unlinked** to any product requirement.
> 
> IOW, we don't need to validate each and every error code returned by the 
> hypercall.
> 
> Or should we just drop this requirement ?

I think you should move this requirement and make it a generic one valid for 
all hypercalls.

Now at some point you might have to describe which error is caused by what 
problem as part of your hypercall interface definition.
ie: one generic product req and per hypercall design req describing the error 
cases.

At the end you should have a test to trigger each error condition and that test 
will be linked to the design req corresponding.

Cheers
Bertrand

> 
> - Ayan
> 
>> 
>> Cheers
>> Bertrand
>> 
>>> +
>>> +Rationale:
>>> +
>>> +Comments:
>>> +
>>> +Covers:
>>> + - `XenMkt~version_hypercall~1`
>>> +
>>> +Needs:
>>> + - XenSwdgn
>>> \ No newline at end of file
>>> -- 
>>> 2.25.1





 


Rackspace

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