[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/2] docs: fusa: Define the requirements for XEN_VERSION hypercall.
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Wed, 15 Jan 2025 12:23:47 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- 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=BAgF3iUkqDSJ+A2tIPb5Cz9QL1wgJdBbdt94dBXwqMg=; b=bfRCRKVLki8iAE9vy6yOdXdkmCA0Yj/Dbmihev2wZsWpZWOWgNhrRU2Ybocvwm/QC2H437megySencfp30R/mlxa7lqboO0Vgc4gZsnfXtdS2oV9GM7TY0KV79A+yoZBkHKMMowFxCdwj/4hICKxSf6wOskJHNVfFhLLhE19RS6dMSjAaM7u+khVOvfHanIcOsjBvZu8B7Npjn8Bt+jzWvYVa/odB4FP9cZDpISH+Vyl+1XKEWy54Euf+iAkE3gBog3dpNgtSSp5EUGdVzRMvsDqdMxJVT6U4eiwOwn2Qymy4Kko3em9Ze/pn/mU8hVMzqN3qmNRLlfa5EgP4RQZEA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jdxVbm6IXvzzegzMjHAZzyBPpxVyE7u3QV/J5SW6NjRCt99hH25JMPxBmn6+fFEHZIfyUKchoA0/03v9budkLHBZ7ctnoCozR9+0AEbo66yil0ge+f658Itnqm3DSSSJrDRYvtQpDYogWHppzlr3jD/Td72YNUDYz+/Y0WIRkvWKS5qzoyOkgoACbsT43WOUep2XqJ5CaYlHSz/RVnu76bKYu82Lhf6lB0GjYNJFgpwd990hKZ7p1ewB7mSThh0xbXaaz2Bw1BxmBYbvmniI5DhBVoQWRhgZ3IUZ3tjHygLaas5HMx9/fkyVIS04D0+UcEIAVbSyOEGL4K/iUcaNSQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>
- Delivery-date: Wed, 15 Jan 2025 12:24:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Andrew,
On 14/01/2025 20:15, Andrew Cooper wrote:
On 14/01/2025 7:50 pm, Ayan Kumar Halder wrote:
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..fdb8da04e1
--- /dev/null
+++ b/docs/fusa/reqs/product-reqs/version_hypercall.rst
@@ -0,0 +1,61 @@
+Return Value
+------------
+
+`XenProd~version_hyp_ret_val~1`
+
+Description:
+Xen shall return 0 in case of success or one of the error codes as defined in
+https://man7.org/linux/man-pages/man3/errno.3.html.
Xen's errors live in public/errno.h
Ack.
They share a lot in common with Linux (for historical reasons), but they
are critically not Linux errnos because Xen supports OSes which aren't
Linux. xenstored for example sends errors as text rather than numbers.
Also, that's not the return value ABI of __HYPERVISOR_xen_version. Some
subops return a positive value instead of 0 on success.
Yes, my bad. 'XENVER_version' cmd will return the actual version number
on success. I should reword this as
"Xen shall use the error codes defined in xen/include/public/errno.h ,
as a return value in case of failure."
And a separate requirement will be
"Xen shall return a non negative value in case of success."
Let me know if this sounds ok.
And if you're wondering "hey, isn't that ambiguous in extreme cases",
yes it is. Xen's hypercall API/ABI are a disaster.
Ack. :)
- Ayan
~Andrew
|