KVM: SVM: force new asid on vcpu migration
commita6582e7e2ab9b52b331e40fc6d0226ff0707a9f4
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 1 Sep 2009 15:15:11 +0000 (1 12:15 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:35 +0000 (8 20:33 -0700)
tree3d9752e0b5194174b81a2afcfc759727259b816f
parent912ae90af5061a6f6af1263863910609da7f3b1d
KVM: SVM: force new asid on vcpu migration

(cherry picked from commit 4b656b1202498184a0ecef86b3b89ff613b9c6ab)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/svm.c