From: Paolo Bonzini Date: Wed, 20 May 2020 12:02:17 +0000 (-0400) Subject: KVM: nSVM: leave ASID aside in copy_vmcb_control_area X-Git-Tag: v5.4.47~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=021cd99a305a081d74419456a84c58f2ec3c398f;p=platform%2Fkernel%2Flinux-rpi.git KVM: nSVM: leave ASID aside in copy_vmcb_control_area 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 580e4cb..3243a80 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -3327,7 +3327,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;