lkml.org 
[lkml]   [2007]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] KVM: do VMXOFF upon reboot
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

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

\
 
 \ /
  Last update: 2007-01-21 12:13    [W:0.057 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site