public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: kvm@vger.kernel.org
Cc: mtosatti@redhat.com, linux-kernel@vger.kernel.org,
	glommer@redhat.com, Florian Westphal <fw@strlen.de>
Subject: [PATCH V2] KVM: x86: disable stealtime on reboot to avoid mem corruption
Date: Wed, 15 Aug 2012 16:00:40 +0200	[thread overview]
Message-ID: <1345039240-29959-1-git-send-email-fw@strlen.de> (raw)

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>
---
 arch/x86/kernel/kvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Changes since v1:
- leave arch/x86/kernel/kvmclock.c as-is (requested by Marcelo)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index c1d61ee..1596cc8 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -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,
-- 
1.7.8.6


             reply	other threads:[~2012-08-15 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 14:00 Florian Westphal [this message]
2012-08-15 18:31 ` [PATCH V2] KVM: x86: disable stealtime on reboot to avoid mem corruption Marcelo Tosatti

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=1345039240-29959-1-git-send-email-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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