KVM: SVM: force new asid on vcpu migration
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 21 Jul 2009 15:47:45 +0000 (12:47 -0300)
committerAvi Kivity <avi@redhat.com>
Wed, 5 Aug 2009 10:59:29 +0000 (13:59 +0300)
commit4b656b1202498184a0ecef86b3b89ff613b9c6ab
tree048c32cca06f74aa0b9dd63048597fa3c6278a7d
parentd6289b9365c3f622a8cfe62c4fb054bb70b5061a
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/10021/)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c