LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] KVM: do VMXOFF upon reboot
Date: Sun, 21 Jan 2007 12:17:18 +0200 [thread overview]
Message-ID: <45B33DAE.20000@qumranet.com> (raw)
In-Reply-To: <20070117100210.GA13080@elte.hu>
Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
>
>> So i think we should do the patch below - this makes reboot work even
>> in atomic contexts. [...]
>>
>
> hm, this causes problems if KVM is not active on a VT-capable CPU: even
> on CPUs with VT supported, if a VT context is not actually activated, a
> vmxoff causes an invalid opcode exception. So the updated patch below
> uses a slightly more sophisticated approach to avoid that problem.
>
>
There is already code to that effect. Any idea why it is not called?
> static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
> void *v)
> {
> if (val == SYS_RESTART) {
> /*
> * Some (well, at least mine) BIOSes hang on reboot if
> * in vmx root mode.
> */
> printk(KERN_INFO "kvm: exiting hardware virtualization\n");
> on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1);
> }
> return NOTIFY_OK;
> }
>
> static struct notifier_block kvm_reboot_notifier = {
> .notifier_call = kvm_reboot,
> .priority = 0,
> };
>
Note that it performs the vmxoff on all cpus, not just one, and that it
is svm friendly too. Maybe it should check for values other than
SYS_RESTART?
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2007-01-21 10:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-17 9:13 [patch] fix emergency reboot: call reboot notifier list if possible Ingo Molnar
2007-01-17 9:22 ` Russell King
2007-01-17 9:39 ` Ingo Molnar
2007-01-17 10:03 ` Andrew Morton
2007-01-17 10:25 ` Ingo Molnar
2007-01-23 19:57 ` Pavel Machek
2007-01-24 16:30 ` Randy Dunlap
2007-01-24 17:49 ` linux-os (Dick Johnson)
2007-01-17 9:51 ` [patch] KVM: do VMXOFF upon reboot Ingo Molnar
2007-01-17 10:02 ` Ingo Molnar
2007-01-21 10:17 ` Avi Kivity [this message]
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=45B33DAE.20000@qumranet.com \
--to=avi@qumranet.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [patch] KVM: do VMXOFF upon reboot' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).