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

Re: [Xen-devel] Hypercall invoking

From: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
Sent: Tuesday, May 10, 2016 7:32 AM
To: tutu sky; Xen-devel@xxxxxxxxxxxxx
Subject: Re: [Xen-devel] Hypercall invoking

On Tue, 2016-05-10 at 06:49 +0000, tutu sky wrote:
> Hi,
> I added a new hypercall to xen successfully, but when i try to invoke
> it in dom0 using privcmd, i am unable to invoke (using XC), I must cd
> to /xen.x.y.z/tools/xcutils and then try to invoke hypercall by XC
> interface which i created for it.
> DO functions of hypercall is written in /xen/common/kernel.c.
> can you give me a clue?
That depends on what you are trying to achieve, and on what you have
implemented and how you have implemented it.

Actually, this is not the first time we tell you this: without you
being specific, we can't possibly help.

In this case, "being specific" would have meant specifying:
 - what is your final end goal
 - what is your plan to reach it

my first goal  was that being able to call a hypercall in user pace program 
(such as system call) in order to do some privilege functions by calling it. it 
was not successful though i didn't know which header files must be included and 
then i understand that because of security reasons it is not possible. then my 
goal chnaged to just  be able for invoking a hypercall from user space. after i 
was unsuccessful for using xen itself hypercalls in user space, i tried to 
create my own hypercall, doing just a simple printk.

 - what you have implemented already of such plan

I did these steps:
1- create .quad and then .byte in entry.S for it
2-create a prototype in hypercall.h
3-a body for it in kernel.c (a simple printk)
now try for using tools for invoking it:
4- add a function in xc_private.h in order to being able for calling hypercall.
5- using the mentioned function in xc_private.h by creating a new C file in 
xcutils (with #include <xc_private.h>)
6- make changes in Makefile exists in /tools/xcutils directory in order to 
correct make

(if any part code is needed let me know)

Showing the code of what you have already implemented is, in theory,
not strictly necessary, but it would help a lot (and may become
necessary, at some point, for being able to help you effectively).

<<This happens because I choose it to happen!>> (Raistlin Majere)
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Xen-devel mailing list



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