WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] how to callback from hypervisor to guest os?
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Sun, 6 Jul 2008 00:18:01 -0400
Delivery-date: Sat, 05 Jul 2008 21:18:23 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=CGi+ts03pL+fL10FugqBXOa0ZTugZ/kqWNGhZnzZzL4=; b=IC49/tH/W9K/OHApl3mkf3M0qSPcenFD4W4Ldgt+L0CEzQr3LQsOOd24Dv6wqYX0Cd jR1kx6FMuzBdSk5L9jBaHY7xCyYJUrwBJ/rIUoXfeA61H77bwJcOAnDQMAUq6rWtKa5f 8gf+XIYCTbH5tT/TR8jObPKAgFX/VjipKwh9s=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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