Avi Kivity wrote: > Jeremy Katz wrote: >> On Wed, 2007-01-31 at 12:32 +0200, Avi Kivity wrote: >>> Jeremy Katz wrote: >>>> Avi Kivity wrote: >>>>> I've committed kvm support for host suspend-to-disk (and hopefully >>>>> resume too). This means you can suspend your machine with running >>>>> vms, and resume it later will all vms returning to the saved >>>>> state. This should please laptop owners. >>>>> >>>> So testing with trunk (r4365) + 2.6.20-rc5-ish, I'm able to suspend >>>> and resume with the modules loaded. Starting a guest after resume >>>> gets the following oops in the host; guest is in the grub menu at >>>> that point. >>>> >>> 2.6.20-rc6 can't suspend my test machine (regardless of kvm), so this >>> possible fix is completely untested. >> >> Failure looks basically the same. Will try to do some more >> investigation later today. > > Looks like ->hardware_enable() was not called for some reason. > Sprinkling printks in the cpu hotplug and resume callbacks will help. Multiple things failing here together. 1) With the versioning of Fedora kernels, things were falling back to the compat version of smp_call_function_single which then doesn't seem to work properly (->hardware_disable() and ->hardware_enable() never get called AFAICT) 2) Switching to use the real smp_call_function_single, I get an oops on suspend since we're trying to run code on the dead cpu. Attached patch makes it so that we do ->hardware_enable() and ->hardware_disable() when the cpu is in a functioning state. With it, I can suspend/resume successfully with no guests running. With a guest running, it's a bit of a toss-up. But one step at a time :) Signed-off-by: Jeremy Katz Jeremy