Messages in this thread | | | Subject | [PATCH 00 of 12] xen: add save/restore/migrate for Xen domains | Date | Fri, 23 May 2008 14:41:07 +0100 | From | Jeremy Fitzhardinge <> |
| |
Hi Ingo,
This series adds save/restore/migrate for Xen domains. This is almost entirely contained within the Xen-specific code.
The only exception is the WARN_ON I remove in hres_timers_resume, which is spurious in the case of a Xen suspend/resume, since we don't offline all the CPUs.
This also adds another user of the freezer, since it turns out to solve a somewhat tricky problem. The problem is that Xen pagetables are expressed in terms of machine frame numbers - ie, the page numbers of the underlying host machine. When the domain is saved, all the mfns everywhere are canonicalized into guest-relative pfns in the save image. The tricky part is that when preemption is enabled, it's possible the suspend will preempt a pagetable manipulation, which will leave a machine frame number sitting in a register or on the stack which will not be canonicalized.
The freezer solves this because it makes sure that every thread is quiesced at a well known point, which is not during a pagetable update. So by freezing everything and then stopping all the processors in stop_machine, we can make sure the system is in a saveable state.
The freezer is only required when preemption is enabled, since stop_machine will quiesce all processors (and therefore threads) at suitable points anyway.
J
| |