From: Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [RFT] kvm host suspend/resume
Date: Wed, 31 Jan 2007 18:00:25 -0500 [thread overview]
Message-ID: <45C11F89.20607@redhat.com> (raw)
In-Reply-To: <45C0B4C1.9030301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
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 <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Jeremy
[-- Attachment #2: kvm-suspend-fix.patch --]
[-- Type: text/x-patch, Size: 679 bytes --]
Index: kvm_main.c
===================================================================
--- kvm_main.c (revision 4369)
+++ kvm_main.c (working copy)
@@ -2107,13 +2107,15 @@
int cpu = (long)v;
switch (val) {
- case CPU_DEAD:
+ case CPU_DOWN_PREPARE:
case CPU_UP_CANCELED:
+ printk(KERN_INFO, "kvm: disabling virtualization on CPU%d\n", cpu);
decache_vcpus_on_cpu(cpu);
smp_call_function_single(cpu, kvm_arch_ops->hardware_disable,
NULL, 0, 1);
break;
- case CPU_UP_PREPARE:
+ case CPU_ONLINE:
+ printk(KERN_INFO, "kvm: enabling virtualization on CPU%d\n", cpu);
smp_call_function_single(cpu, kvm_arch_ops->hardware_enable,
NULL, 0, 1);
break;
[-- Attachment #3: Type: text/plain, Size: 374 bytes --]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
next prev parent reply other threads:[~2007-01-31 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-28 12:27 [RFT] kvm host suspend/resume Avi Kivity
[not found] ` <45BC96BB.5080203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-29 5:04 ` dormando
[not found] ` <45BD8079.8020202-uFjFfPRxV21eoWH0uzbU5w@public.gmane.org>
2007-01-29 8:24 ` Avi Kivity
2007-01-30 19:43 ` Jeremy Katz
[not found] ` <45BF9FDB.6060302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-01-31 10:32 ` Avi Kivity
[not found] ` <45C07051.60003-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-31 15:19 ` Jeremy Katz
[not found] ` <1170256759.2880.1.camel-T9xAYgMuJli44ywRPIzf9A@public.gmane.org>
2007-01-31 15:24 ` Avi Kivity
[not found] ` <45C0B4C1.9030301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-31 23:00 ` Jeremy Katz [this message]
[not found] ` <45C11F89.20607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-02-01 8:09 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45C11F89.20607@redhat.com \
--to=katzj-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox