public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@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 12:32:49 +0200	[thread overview]
Message-ID: <45C07051.60003@qumranet.com> (raw)
In-Reply-To: <45BF9FDB.6060302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

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.

-- 
error compiling committee.c: too many arguments to function


[-- Attachment #2: hotplug-hotfix.patch --]
[-- Type: text/x-patch, Size: 1768 bytes --]

Index: linux/drivers/kvm/kvm_main.c
===================================================================
--- linux/drivers/kvm/kvm_main.c	(revision 4365)
+++ linux/drivers/kvm/kvm_main.c	(working copy)
@@ -2113,6 +2113,16 @@
 		smp_call_function_single(cpu, kvm_arch_ops->hardware_disable,
 					 NULL, 0, 1);
 		break;
+	}
+	return NOTIFY_OK;
+}
+
+static int kvm_cpu_hotplug2(struct notifier_block *notifier, unsigned long val,
+			   void *v)
+{
+	int cpu = (long)v;
+
+	switch (val) {
 	case CPU_UP_PREPARE:
 		smp_call_function_single(cpu, kvm_arch_ops->hardware_enable,
 					 NULL, 0, 1);
@@ -2126,6 +2136,11 @@
 	.priority = 20, /* must be > scheduler priority */
 };
 
+static struct notifier_block kvm_cpu_notifier2 = {
+	.notifier_call = kvm_cpu_hotplug2,
+	.priority = 2, /* must be < scheduler priority */
+};
+
 static __init void kvm_init_debug(void)
 {
 	struct kvm_stats_debugfs_item *p;
@@ -2197,6 +2212,7 @@
 
 	on_each_cpu(kvm_arch_ops->hardware_enable, 0, 0, 1);
 	r = register_cpu_notifier(&kvm_cpu_notifier);
+	register_cpu_notifier(&kvm_cpu_notifier2);
 	if (r)
 		goto out_free_1;
 	register_reboot_notifier(&kvm_reboot_notifier);
@@ -2226,6 +2242,7 @@
 out_free_2:
 	unregister_reboot_notifier(&kvm_reboot_notifier);
 	unregister_cpu_notifier(&kvm_cpu_notifier);
+	unregister_cpu_notifier(&kvm_cpu_notifier2);
 out_free_1:
 	on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1);
 	kvm_arch_ops->hardware_unsetup();
@@ -2239,6 +2256,7 @@
 	sysdev_class_unregister(&kvm_sysdev_class);
 	unregister_reboot_notifier(&kvm_reboot_notifier);
 	unregister_cpu_notifier(&kvm_cpu_notifier);
+	unregister_cpu_notifier(&kvm_cpu_notifier2);
 	on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1);
 	kvm_arch_ops->hardware_unsetup();
 	kvm_arch_ops = NULL;

[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- 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

  parent reply	other threads:[~2007-01-31 10:32 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 [this message]
     [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
     [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=45C07051.60003@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=katzj-H+wXaHxf7aLQT0dZR+AlfA@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