From: Serge Hallyn <1497479@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1497479] Re: memory corruption with migrate/savevm in TCG mode
Date: Mon, 21 Sep 2015 17:12:01 -0000 [thread overview]
Message-ID: <20150921171201.GA20539@ubuntumail> (raw)
In-Reply-To: 20150921162037.9102.32694.malone@gac.canonical.com
Generally combining them is still better - but if it helps you to
keep things straight then no problem, sorry for the noise - thanks.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1497479
Title:
memory corruption with migrate/savevm in TCG mode
Status in QEMU:
New
Bug description:
[ISSUE]
QEMU releases 2.3.1 and lower are forgetting to flush TLBs before
enabling the global dirty pages log and entering the final stage of
saving the VM.
[DESCRIPTION]
The situation is the following:
1. TLB misses is the only way for page dirtying in the TCG mode.
2. If TLB is always hit by a running VM code during the execution of the `ram_save_iterate' by migration thread then these pages are missing in the dirty log. The TLB is always hit for instance when the VM is mostly idling and the Kernel only handles APIC timer interrupts.
3. These pages are then missed during `ram_save_complete' stage.
4. This makes memory content in a saved VM state differ from the actual VM memory.
5. If the affected memory pages contain some Kernel data structures these can be corrupted by this memory inconsistency, causing Kernel to Oops after loading the saved state.
[SOLUTION]
A proposed solution is to flush TLB when `log_global_start' is called.
Here is the patch: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1493049/+attachment/4459905/+files/tcg-commit-on-log-global-start.patch
[LINKS]
Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1493049
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1497479/+subscriptions
next prev parent reply other threads:[~2015-09-21 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 23:58 [Qemu-devel] [Bug 1497479] [NEW] memory corruption with migrate/savevm in TCG mode Pavel Boldin
2015-09-19 1:03 ` [Qemu-devel] [Bug 1497479] " Pavel Boldin
2015-09-21 15:38 ` Serge Hallyn
2015-09-21 16:20 ` Pavel Boldin
2015-09-21 17:12 ` Serge Hallyn [this message]
2018-09-05 8:48 ` Thomas Huth
2018-11-05 4:17 ` Launchpad Bug Tracker
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=20150921171201.GA20539@ubuntumail \
--to=1497479@bugs.launchpad.net \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).