[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Trigger code in domU from dom0
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm doing something very similar for a research project. Assuming your domU is PV, look in linux/drivers/xen/core/reboot.c and linux/drivers/xen/core/machine_reboot.c. You'll discover that the dom0 tools don't actually suspend the domU for migration: instead, they send an event channel event to domU which then suspends itself via a hypercall. All you have to do is pick a place sufficiently close to the hypercall to run your own code. Note that this is SMP safe as well: one of the first things the kernel does when the suspend message is received is shut down all CPUs except for #0, so only #0 will be alive around the hypercall. Combining that with the lack of preemption in the Xen kernel, you have a situation where your code is guaranteed to run before anything else. Chris Asim wrote: | Hi, | | I want to trigger some code in my domU as soon as migration happens. I | can only know when to trigger in my destination dom0 but the code | should trigger in domU. | How do I go about doing this? Is there any script that completes or is | running that executes when a migration finishes or is about to finish? | | Regards, | Asim | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: GnuPT 2.7.2 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiuLA0ACgkQiD2svb/jCb7h/gCeNrT5yZXcX8T8oRlcFOtkSTQI gFwAn00RJmlo6xuQpxLOZg4Yo9fM/gpE =7q20 -----END PGP SIGNATURE----- _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |