From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6718C433DF for ; Tue, 16 Jun 2020 15:54:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C71321532 for ; Tue, 16 Jun 2020 15:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322864; bh=TW9JezX4flra15yeNwYJVoO40qkjcL7U7ogEwc1jMaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=UPyaFugCgsLwT/McQcbEw3us8VDxAsI3yX22RW0+Wt6tNQD38wFXa1XZLm6cKYu5U Rf7jAPgEmu0oExcP+Hf/qpLo9e6GAsvdZhr9p2UG3Q47omVSxAdlN/VbjoT+QjtrD1 lv26/40av5BrGWHaPx+4j5tvaLg3XALp5a0KJLec= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732403AbgFPPyV (ORCPT ); Tue, 16 Jun 2020 11:54:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731739AbgFPPyL (ORCPT ); Tue, 16 Jun 2020 11:54:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B73C521532; Tue, 16 Jun 2020 15:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322851; bh=TW9JezX4flra15yeNwYJVoO40qkjcL7U7ogEwc1jMaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J8UkGgs/UNJgauMpl++MUycFxEs5kjIx8nr4ppTYwUm2kXrc4cEHdX8gGm6ngQsjc wUe92PGZoapcj1YcXqE4NQQJTEP1ch1OV/YKRjTCQS8oIPa9ZZft+PYm9oVcX1QN/q RROBmB/KLmIGQtvln2lMwR9WjSCeWtP8ohJyqqn4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini Subject: [PATCH 5.6 127/161] KVM: nSVM: leave ASID aside in copy_vmcb_control_area Date: Tue, 16 Jun 2020 17:35:17 +0200 Message-Id: <20200616153112.411554722@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200616153106.402291280@linuxfoundation.org> References: <20200616153106.402291280@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Bonzini 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 --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -3326,7 +3326,7 @@ static inline void copy_vmcb_control_are 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;