[PATCH 00 of 12] xen: add save/restore/migrate for Xen domains

From: Jeremy Fitzhardinge
Date: Fri May 23 2008 - 09:44:30 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/