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=ham 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 64C4DC433E0 for ; Fri, 19 Jun 2020 14:41:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32EA121527 for ; Fri, 19 Jun 2020 14:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577666; bh=09ANfcIoFtoseywVEXuOEhnXG0KXcnCoeopx/7x8dpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=P5FnfuHQz4V7xbiU8XvDkpXtO2Lfwu6ygM+Zc6oXMu+aVXrwHQfLmKhBcws2+hrVx 1yy6McGmUG4jWypCCxivHHCbIXgpKhAkKJgeWGBsYLwLeAoMLF950Aluy4a/tgY8fs j3GuyfiVy6Axocz5DmoWXlPn11suxoda8I/cJsnc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387442AbgFSOlF (ORCPT ); Fri, 19 Jun 2020 10:41:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:59260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387836AbgFSOlB (ORCPT ); Fri, 19 Jun 2020 10:41:01 -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 6B45020A8B; Fri, 19 Jun 2020 14:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577661; bh=09ANfcIoFtoseywVEXuOEhnXG0KXcnCoeopx/7x8dpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W3NNKY1oKf1UvWTfgSW9ojul6/yabXFSxPkf9q0FvWxXqIeCSjDc+cZflsnYSiskz IZ3dg7RpBvZHf0X0PD9o88eXAwQD+pAzxMWSz1L7o7sZr0JoZwdkhQT3HluCz+/Wot DHglC5nQ0Wkx6GnrEn2QlPVtLhmk2aWK3kWfyQDw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini Subject: [PATCH 4.9 038/128] KVM: nSVM: leave ASID aside in copy_vmcb_control_area Date: Fri, 19 Jun 2020 16:32:12 +0200 Message-Id: <20200619141622.228306286@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141620.148019466@linuxfoundation.org> References: <20200619141620.148019466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 @@ -2734,7 +2734,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;