]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: nSVM: leave ASID aside in copy_vmcb_control_area
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 May 2020 12:02:17 +0000 (08:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:42:04 +0000 (16:42 +0200)
commit 6c0238c4a62b3a0b1201aeb7e33a4636d552a436 upstream.

Restoring the ASID from the hsave area on VMEXIT is wrong, because its
value depends on the handling of TLB flushes.  Just skipping the field in
copy_vmcb_control_area will do.

Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c

index b43f06d7b56b1aeb4dbee1a49d83cbae4513af7c..eee7cb0e1d952086f14b60755cebd7548f9ff90b 100644 (file)
@@ -3326,7 +3326,7 @@ static inline void copy_vmcb_control_area(struct vmcb *dst_vmcb, struct vmcb *fr
        dst->iopm_base_pa         = from->iopm_base_pa;
        dst->msrpm_base_pa        = from->msrpm_base_pa;
        dst->tsc_offset           = from->tsc_offset;
-       dst->asid                 = from->asid;
+       /* asid not copied, it is handled manually for svm->vmcb.  */
        dst->tlb_ctl              = from->tlb_ctl;
        dst->int_ctl              = from->int_ctl;
        dst->int_vector           = from->int_vector;