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 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. And if you're wondering "hey, isn't that ambiguous in extreme cases", yes it is. Xen's hypercall API/ABI are a disaster. ~Andrew