The invention discloses a method for communication between a user program and a
virtual machine on a
microkernel Hypervisor, the
microkernel Hypervisor is provided with two
shared memory areas, the
shared memory area 1 is accessed by the user program and a root service Rootserver, the
shared memory area 2 is accessed by the Rootserver and the
virtual machine, the user program writes communication request data with the
virtual machine into the shared memory area 1, and the user program writes communication request data with the virtual
machine into the shared memory area 2. The method comprises the following steps that a VMM sub-thread is used as a shared memory area 1, a Rootserver is notified through inter-
process communication, the Rootserver reads communication request data from the shared memory area 1, the communication request data is written into a shared memory area 2 after being analyzed by the VMM sub-thread, a
system calls a syscale to transmit a communication request to a kernel, the kernel injects virtual interrupt into a virtual
machine, and the virtual
machine sends the communication request to the Rootserver. And an interrupt
processing program of the virtual machine processes the communication request and writes a
processing result into the shared memory area 2, then the
processing result is returned to the
Hypervisor through the Hypercall, and a Rootserver of the Hypervisor feeds back the processing result to a user program through the IPC. The method is designed for the
microkernel Hypervisor environment, and the overall performance and efficiency of the embedded
virtualization system are improved.