Xen is a beginner. The concept of the communication mechanism between domu and dom0 is unclear. It is summarized as follows for your reference. Find a paper named "xen-based I/O quasi-virtualization driving research" (Hu Leng Fei.
(1) I/O shared ring: a fixed shared memory exists between different domains,It is used to transmit I/O requests and responses between domu and dom0.The I/O sharing ring uses producer and consumer mechanisms to generate and respond to IO requests.
(2) Authorization Table: between different domEfficient Io Data Transmission Mechanism. Map the memory to the destination Dom or transmit the memory to the destination Dom through the authorization table.
(3) event channel: Used Between Dom and xen, Between Dom and DomAsynchronous event notification mechanism.
Note the bold characters above.
Take domainu as an example to write data to the IO Device:
1. domu generates IO requests and adds requests to the IO sharing ring.
2. Put the IO data in the memory pointed to by the authorization table and wait for dom0 to fetch the data.
3. Everything is ready. Notify dom0 through the event channel to start processing.
4. dom0 receives a notification from the event channel, knowing that there is data to be processed.
5. Then, dom0 extracts the IO request from the IO sharing ring and analyzes what domu wants dom0 to do for him.
6. After understanding what to do, extract the data from the authorization table for processing.
7. After the data processing is complete, dom0 puts the processed information into the IO sharing ring and sends a notification to domu through the event channel, telling him that the processing is complete.
8. domu receives the notification from the event channel, extracts the corresponding information from the IO sharing ring, and then processes it.
Conclusion: Io sharing ring is used for specific IO requests (such as sending network data). It is a request! Event channels are used for notifications! The authorized table points to the memory where data is stored!
For example, a (domu) asks B (dom0) to help save some valuable S (data). First, a writes a piece of paper (IO sharing ring ), the above describes what B is requested to help, put it at the door of B, and then knock on the door (event channel ). B. After hearing the knock on the door (the event channel is interrupted), he opens the door and sees the paper (I/O sharing ring). After analyzing the above content, he goes to the inherent LOCATION OF A (the memory address stated in the authorization form) get item S. After everything is done, write a piece of paper (I/O sharing ring) and paste it at the door of a, knocking on the door (event channel ).