dykelin
dykelin

Reputation: 11

how to transfer signal between the guest os run on the host os with QEMU and its host os

My question is how to transfer signal between the guest os run on the host os with QEMU and its host os, I write some datas to the shared memory that created on the host os by an thread of the guest OS, and want the other thread which on the host os know it and to read the datas, but no use poll in the thread of the host os, I want to know is there has any ways to achive this? Thanks for any suggestion from you!

Upvotes: 1

Views: 876

Answers (1)

prathmesh.kallurkar
prathmesh.kallurkar

Reputation: 5696

Qemu gives the guest an abstraction of the complete system. And you cannot use shared memory IPC across machines. I would suggest using special instruction which can be used the qemu disassembly function to know that an IPC is required.

Steps :

  1. use a special marker instruction in the guest app. Lets say "int $100".
  2. Create a helper function in qemu that will be called when this instruction occurs.
  3. now, when you receive a callback function in qemu, check for a known virtual address that stores the pointer to your data and the length of the data.

done ..

Upvotes: 2

Related Questions