Hi All Some basic doubts about Hypercall return type. If kernel issue a hypercall, and there is no corresponding entry in entry.S in Hypervisor, it gives weired return type and Kernel interpret it in completely different manner. eg in GCOV case, I issued hypercall, when there is no corresponding entry in Hypervisor, it gives -38<3> as return type. and Kernel Send a message to userspace (in case of kernel module) as Kernel does not have module support, which is total misleading. 1. Is this return type is intended? 2. Why there is no interpretation of hypercall return type in kernel? Hope i am not missing any obvious thing thanks -tej _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 09/04/2009 11:38, "Tej" <bewith.tej@gmail.com> wrote:> eg in GCOV case, I issued hypercall, when there is no corresponding > entry in Hypervisor, it gives -38<3> as return type. and Kernel Send a > message to userspace (in case of kernel module) as Kernel does not > have module support, which is total misleading.The return code is ENOSYS, which is appropriate for an unimplemented hypercall. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Apr 9, 2009 at 4:50 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 09/04/2009 11:38, "Tej" <bewith.tej@gmail.com> wrote: > >> eg in GCOV case, I issued hypercall, when there is no corresponding >> entry in Hypervisor, it gives -38<3> as return type. and Kernel Send a >> message to userspace (in case of kernel module) as Kernel does not >> have module support, which is total misleading. > > The return code is ENOSYS, which is appropriate for an unimplemented > hypercall.Still it could be misleading, because in case of kernel modules "module-uti"l packages overrides ENOSYS with message as "Kernel does not have module support" an explicit return type could be useful here.> > -- Keir > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 09/04/2009 13:28, "Tej" <bewith.tej@gmail.com> wrote:>> The return code is ENOSYS, which is appropriate for an unimplemented >> hypercall. > > Still it could be misleading, because in case of kernel modules > "module-uti"l packages overrides ENOSYS with message as "Kernel does > not have module support" > > an explicit return type could be useful here.Separate from the kernel''s return code you mean? Yes, you could certainly define a new ioctl that returns the code in the command structure passed to the ioctl, for example. I''d have no problem with that. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel