Skip to content

Commit

Permalink
KVM guest: disable stealtime on reboot to avoid mem corruption
Browse files Browse the repository at this point in the history
else, host continues to update stealtime after reboot,
which can corrupt e.g. initramfs area.
found when tracking down initramfs unpack error on initial reboot
(with qemu-kvm -smp 2, no problem with single-core).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
Florian Westphal authored and Marcelo Tosatti committed Aug 15, 2012
1 parent 28a6fda commit 8fbe6a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ static void kvm_pv_guest_cpu_reboot(void *unused)
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
kvm_pv_disable_apf();
kvm_disable_steal_time();
}

static int kvm_pv_reboot_notify(struct notifier_block *nb,
Expand Down

0 comments on commit 8fbe6a5

Please sign in to comment.