[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] How does hypervisor handle the hypercalls from guest OSes?
> I'm trying to encapsulate some operations into "hypercall" and pass > the hypercall into hypervisor. > > But I cannot find out how the hypervisor to deal with hypercalls > from guest OSes. Hypercalls go from ring 1 (xenolinux kernel) to ring 0; they are invoked by using "int $0x82". You can see the "top half" (guest side) of the hypercall interface by looking at the file xenolinux-2.4.2x-sparse/include/asm-xen/hypervisor.h which includes a bunch of inline C functions like: static inline int HYPERVISOR_mmu_update(mmu_update_t *req, int count) { int ret; __asm__ __volatile__ ( TRAP_INSTR : "=a" (ret) : "0" (__HYPERVISOR_mmu_update), "b" (req), "c" (count) : "memory" ); return ret; } You can see the "bottom half" (xen side) of the hypercall interface by looking at the files xen/include/hypervisor-ifs/hypervisor-if.h xen/arch/i386/entry.S ; the former includes definitions of all the numbers used for the various hypercalls while latter handles the int $0x82 and decides which actual hypercall to invoke (by using hypervisor_call_table; see the end of entry.S). > I find a function "do_dom0_op" in xeno-1.2.bk/xen/common/dom0_ops.c. > > It looks like the function which would deal with hypercalls . No; a dom0_op is just one of the hypercalls; it is the general method used for control software (running in domain 0) to invoke various operations within Xen. Depending on what you're actually trying to do, adding a new dom0_op rather than a new hypercall might be the right thing to do though. > and I try to modify the code in do_dom0_op to handle my new > hypercall, but I failed. Yes. > can someone tell me how does hypervisor handle the hypercalls from > guest OSes? Hopefully the above description is of some use. cheers, S. ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |