On Oct 1, 2006, at 1:20 PM, poff wrote:

I don't know if I'm off base but have you added appropriate code to
linux? specifically arch/powerpc/platforms/xen/hcall.c ?

An existing hypercall, viz #36, do_domctl, provides several commands to access guest domains. For example, XEN_DOMCTL_getmemlist and XEN_DOMCTL_max_mem. Thought I would add another to copy the htab, XEN_DOMCTL_gethtab. So I think no modification is needed to hcall.c

Sadly, there is:
Some architectures require that the linux kernel has knowledge of all hcalls, and PPc is one of them

you will notice in:
  arch/powerpc/platforms/xen/hcall.c: xenppc_privcmd_domctl()
there is a huge switch statement for all the domctl OPs.

If your case is not in the switch then you are subject to:
                printk(KERN_ERR "%s: unknown domctl cmd %d\n", __func__, 
                return -ENOSYS;
and hence your ENOSYS

Since you are modeling the OP from XEN_DOMCTL_getmemlist, if you are reusing the data structure as well (which would make sense then the following diff should solve your problem:

diff -r c52ba3176a28 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.c        Thu Sep 28 12:26:59 2006 -0400
+++ b/arch/powerpc/platforms/xen/hcall.c        Sun Oct 01 15:30:45 2006 -0400
@@ -273,6 +273,7 @@ static int xenppc_privcmd_domctl(privcmd
        case XEN_DOMCTL_getdomaininfo:
        case XEN_DOMCTL_getmemlist:
+       case XEN_DOMCTL_gethtab:
                ret = xencomm_create(
                        kern_op.u.getmemlist.max_pfns * sizeof(unsigned long),

BTW: since we are trying to stick with Xen names "XEN_DOMCTL_getshadowlist" might be better, but at this point it is a name and can be debated later.


Xen-ppc-devel mailing list

Reply via email to