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

[Xen-devel] how to callback from hypervisor to guest os?


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: weiming <zephyr.zhao@xxxxxxxxx>
  • Date: Sun, 6 Jul 2008 00:18:01 -0400
  • Delivery-date: Sat, 05 Jul 2008 21:18:23 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=nz0KarCcT+Bm5X7sf/W+VJ8nzlNsUzoEmmQBlbmu6gL54RZQxFlOTYuCw0XIEIqgQ7 fKmz7RgycCY0Z9E1E2CG7/SaZLxzr3kIWNHpBuu5DYGRylKnLwUwb0Pn8Sa1Q9nZlhBW gvFPFGw1HpFkQFw8nLiUKr4EVyYWL29207mSo=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

I try to let xen calls a kernel function in guest OS, is it possible?

Here is the detail:

Normally, when a guest hits a fault, the control is transfered to xen. Then xen handles the fault and then transfer the control back to guest.

For example, in original xen:
void some_fault_handler()
{

   ...
   ...
   finally, then let guest os handles it
}

Now, I want to call some guest OS function in xen's handler:

void some_fault_handler()
{

  guest_func() // a function in guest kernel
   ...
   ...
   finally, then let guest os handles it
}


I can write a module (driver) in guest os, so when guest os boots, I can pass the address of my function to xen. My question is that when xen calls my function, it needs to swtich to "guest mode". How to do this? and when the function call finishes, how to let it come back to xen's context?

Thanks,
Weiming
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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