Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2538904yba; Mon, 6 May 2019 07:42:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDLIg65RtrrMt5O8e8bwcQ1aXsJGT05FTb521tEt7pI5d77jrA1WT3fpFt6DIXM2ztbWbA X-Received: by 2002:a17:902:42a5:: with SMTP id h34mr26561273pld.146.1557153728923; Mon, 06 May 2019 07:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557153728; cv=none; d=google.com; s=arc-20160816; b=G7rxRZH3gHJCA43hIZrNbzed8FdmfNPjQpWs4qjs28Li9xX2TO3a2B1erT4AVaxBhY u+cXb1tF64QXgGQkUNyxvgLwhjImSsuyOnE7QJOQFqe6ZvqjNTaH3OLMeAuEcb3/A4ml kAzB0jBwMnW2EuHM4vK/wqRiQ48fJw9l01KGALrD6AJ0e2g6oxN2N4vyMIRS1cOv1s+6 BVIlZ7277B7uE0QGd8wi54C0Gb2HU/Z1i7M6i5sD7TpbQL1bp3UVjbIJDcNtgo88bfnQ 5a+j3nLVATVvnMh/oukkSSHa/lp/3Z8xRfZvBPnIGMZbh3EnQjPegteGwqMw7ipSlyUk BN2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t7z2dOEt0XtjKGS+nucno8W5Gt6iENKIVFJh+RIT7Ks=; b=jwipqF9GCxFhxLQcCh9bUpt7A4jK+LCRikgD9mlbgeC92b2Vtq1xmOQRlN0NtfK2TM oHxEK4FRhVRrLjvuHUhKVsW+MwiuAggQm2zzni3XC7LfhYFXo6tpmj8szKSH6+5xdCfX 2CAaaLzf3EsCxX1qSyuKzJPXBZ9/O2rcT6YrHDk6NWrhOdcbzIxiKtsYwF4kL8fmkFae Kr4tvv7pYcjV74rTik8eRcI14okYvzIJ7ot4dAe8EQXzTMXRlH/ndyu+LxrhXKH2oejZ F7wv5IEw3o/ScR3rRAHd/dyEqay/jEjMHAxHGN4FnpfKCvHtQ182ohjnqe+diLvoVFA4 K6bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G8F40JcA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 202si6200086pgh.575.2019.05.06.07.41.52; Mon, 06 May 2019 07:42:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G8F40JcA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727694AbfEFOiy (ORCPT + 99 others); Mon, 6 May 2019 10:38:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:60126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbfEFOiu (ORCPT ); Mon, 6 May 2019 10:38:50 -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 7806720449; Mon, 6 May 2019 14:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153529; bh=/s6rXOI8IV/DPvBnhM0ct5g2KPuwwczgCDOBFL9FudM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G8F40JcAl1m3X77wnEpE+OvJcQURU/OtCqcWUWEMwOi56LG8nt6llmq1S5R+9kGOQ T3+oBDPWrBhLzbpNjFv1xSf8giOiFC0nC6XqMnCoT/eo3jcR1b0Va6IGXmgHN9sjSa Q365uRv+jsKFkQivxsb+rB/0p17YRLGkQCpCzoow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Zhang , Paolo Bonzini Subject: [PATCH 5.0 102/122] kvm: vmx: Fix typos in vmentry/vmexit control setting Date: Mon, 6 May 2019 16:32:40 +0200 Message-Id: <20190506143103.899030465@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@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: Yu Zhang commit d92935979adba274b1099e67b7f713f6d8413121 upstream. Previously, 'commit f99e3daf94ff ("KVM: x86: Add Intel PT virtualization work mode")' work mode' offered framework to support Intel PT virtualization. However, the patch has some typos in vmx_vmentry_ctrl() and vmx_vmexit_ctrl(), e.g. used wrong flags and wrong variable, which will cause the VM entry failure later. Fixes: 'commit f99e3daf94ff ("KVM: x86: Add Intel PT virtualization work mode")' Signed-off-by: Yu Zhang Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx/vmx.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/arch/x86/kvm/vmx/vmx.h +++ b/arch/x86/kvm/vmx/vmx.h @@ -444,7 +444,8 @@ static inline u32 vmx_vmentry_ctrl(void) { u32 vmentry_ctrl = vmcs_config.vmentry_ctrl; if (pt_mode == PT_MODE_SYSTEM) - vmentry_ctrl &= ~(VM_EXIT_PT_CONCEAL_PIP | VM_EXIT_CLEAR_IA32_RTIT_CTL); + vmentry_ctrl &= ~(VM_ENTRY_PT_CONCEAL_PIP | + VM_ENTRY_LOAD_IA32_RTIT_CTL); /* Loading of EFER and PERF_GLOBAL_CTRL are toggled dynamically */ return vmentry_ctrl & ~(VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VM_ENTRY_LOAD_IA32_EFER); @@ -454,9 +455,10 @@ static inline u32 vmx_vmexit_ctrl(void) { u32 vmexit_ctrl = vmcs_config.vmexit_ctrl; if (pt_mode == PT_MODE_SYSTEM) - vmexit_ctrl &= ~(VM_ENTRY_PT_CONCEAL_PIP | VM_ENTRY_LOAD_IA32_RTIT_CTL); + vmexit_ctrl &= ~(VM_EXIT_PT_CONCEAL_PIP | + VM_EXIT_CLEAR_IA32_RTIT_CTL); /* Loading of EFER and PERF_GLOBAL_CTRL are toggled dynamically */ - return vmcs_config.vmexit_ctrl & + return vmexit_ctrl & ~(VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL | VM_EXIT_LOAD_IA32_EFER); }