Bug 513394 - KVM: SVM: force new asid on vcpu migration (upstream backport)
Summary: KVM: SVM: force new asid on vcpu migration (upstream backport)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 5.4
Assignee: Marcelo Tosatti
QA Contact: Lawrence Lim
URL:
Whiteboard:
: 511151 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-23 13:41 UTC by Marcelo Tosatti
Modified: 2018-10-19 23:57 UTC (History)
9 users (show)

Fixed In Version: kvm-83-96.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:36:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
kvm-svm-force-new-asid-on-vcpu-migration.patch (1.66 KB, patch)
2009-07-23 13:41 UTC, Marcelo Tosatti
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1272 0 normal SHIPPED_LIVE New package: kvm 2009-09-01 09:34:32 UTC

Description Marcelo Tosatti 2009-07-23 13:41:33 UTC
Created attachment 354857 [details]
kvm-svm-force-new-asid-on-vcpu-migration.patch

KVM: SVM: force new asid on vcpu migration
    
If a migrated vcpu matches the asid_generation value of the target pcpu,
there will be no TLB flush via TLB_CONTROL_FLUSH_ALL_ASID.
    
The check for vcpu.cpu in pre_svm_run is meaningless since svm_vcpu_load
already updated it on schedule in.
    
Such vcpu will VMRUN with stale TLB entries.
    
Based on original patch from Joerg Roedel (http://patchwork.kernel.org/patch
    
Signed-off-by: Marcelo Tosatti <mtosatti>
Acked-by: Joerg Roedel <joerg.roedel>

Comment 4 Eduardo Habkost 2009-07-23 14:44:59 UTC
Marcelo, how serious is the bug the patch solves? Do you think this should be considered a blocker?

Comment 5 Marcelo Tosatti 2009-07-23 14:55:27 UTC
Its possible, in rare conditions, that guest 2 runs with TLB entries from guest 1. So when that happens, both guests can have their memory corrupted.

There is no report of the problem, and there is no testcase, but its a theoretical possibility.

Comment 6 Marcelo Tosatti 2009-07-23 14:57:31 UTC
Given that there are no reports of the such issues, i would say its not a blocker.

Given the description of the bug, i would say its a blocker.

So nice to have it included if possible.

Comment 16 Dor Laor 2009-08-05 13:23:04 UTC
*** Bug 511151 has been marked as a duplicate of this bug. ***

Comment 17 Aron Griffis 2009-08-05 16:05:06 UTC
Bug 511151 has been marked a duplicate of this bug, but some things are not clear:

1. In bug 511151 we have a reproducer for this problem, contrary to comment 6 in this bug, so it's clearly a blocker.

2. Bug 511151 is high priority, high severity, but this bug is marked low/medium, so this bug probably needs to be modified appropriately.

3. This is marked ON_QA but I can't see if this is included in RHEL 5.4 already.  Comments 7-15 are hidden.

Comment 18 Eduardo Habkost 2009-08-05 17:03:30 UTC
(In reply to comment #17)
> 3. This is marked ON_QA but I can't see if this is included in RHEL 5.4
> already.  Comments 7-15 are hidden.  


The patch mentioned on comment #0 was included on kvm-83-96.el5, and this bug is marked as blocker.

Comment 19 lihuang 2009-08-13 02:37:05 UTC
Tested :
1 run 48 VMs ( 1 vcpu,4 GB RAM ) on a 16 CPU AMD host for 12 hours 
2 run 24 VMs ( 1 vcpu,1 GB RAM ) on a 8  CPU Intel host for 72 hours  
3 run 12 VMs ( 1 vcpu,1 GB RAM ) on a 4  CPU AMD host for 72 hours
No Error was found so far.
and no evidence show this patch introduce regression in the acceptance testing . 
setting to VERIFIED

Comment 21 errata-xmlrpc 2009-09-02 09:36:13 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/RHEA-2009-1272.html


Note You need to log in before you can comment on or make changes to this bug.