Bug 683781

Summary: kvm: guest stale memory after migration [rhel-6.0.z]
Product: Red Hat Enterprise Linux 6 Reporter: RHEL Program Management <pm-rhel>
Component: kernelAssignee: Frantisek Hrbata <fhrbata>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: akong, bcao, dhoward, jasowang, llim, michen, mst, plyons, pm-eus, tburke
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-71.20.1.el6 Doc Type: Bug Fix
Doc Text:
Migrating a guest could have resulted in dirty values for the guest being retained in memory, which could have caused both the guest and qemu to crash. The trigger for this was memory pages being both write-protected and dirty simultaneously. With this update, memory pages in the current bitmap are either dirty or write-protected when migrating a guest, with the result that neither qemu nor guest operating systems crash following a migration.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-08 02:59:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 647367    
Bug Blocks:    

Description RHEL Program Management 2011-03-10 11:32:55 UTC
This bug has been copied from bug #647367 and has been proposed
to be backported to 6.0 z-stream (EUS).

Comment 4 Mike Cao 2011-04-01 10:33:31 UTC
Tested on in 
I also tried on kernel-2.6.32-71.18.1.el6(patch not included)kernel-2.6.32-71.24.1.el6(patch included)&qemu-kvm-0.12.1.2-2.113.el6_0.8.x86_64

Repeat the steps in https://bugzilla.redhat.com/show_bug.cgi?id=642243#c1 100 times

Actual Results:
on kernel-2.6.32-71.18.1.el6 ,no kernel panic occurs in the guest ,can NOT reproduce this issue 
on kernel-2.6.32-71.24.1.el6 ,no kernel panic occurs in the guest

Hi,Frantisek
pls take a look the results above ,I can NOT reproduce on kernel-2.6.32-71.18.1.el6 ,I also tried 100 times on the fixed kernel ,also no kernel panic ,

Based on above ,How to deal with it ?

Comment 8 Miya Chen 2011-04-04 08:13:01 UTC
Confirmed with mst, QE do patch check and regression test to verify this bug:
1. # grep 683781 kernel.spec 
- [virt] kvm: write protect memory after slot swap (Michael S. Tsirkin) [683781 647367]

2. Repeat the steps in https://bugzilla.redhat.com/show_bug.cgi?id=642243#c1 100
times on kernel-2.6.32-71.24.1.el6 ,no kernel panic occurs in the guest.

Comment 11 errata-xmlrpc 2011-04-08 02:59:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0421.html

Comment 12 Martin Prpič 2011-04-12 12:44:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Migrating a guest could have resulted in dirty values for the guest being retained in memory, which could have caused both the guest and qemu to crash. The trigger for this was memory pages being both write-protected and dirty simultaneously. With this update, memory pages in the current bitmap are either dirty or write-protected when migrating a guest, with the result that neither qemu nor guest operating systems crash following a migration.