Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2454894imd; Fri, 2 Nov 2018 11:41:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5e3Bmz6LZ1ju6Wz7/a3Gx95FwbgSAEHJVddVGP2VoTRZrNap+ZGHxWAdrGjqXHMS1xOpWzO X-Received: by 2002:a63:5a57:: with SMTP id k23mr11830923pgm.5.1541184088795; Fri, 02 Nov 2018 11:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184088; cv=none; d=google.com; s=arc-20160816; b=lu0skM9PHxBAYGSXanLzdVP4cE+hYEcha7UnhV7t8j7m+i2YyuvIfHcemwFRNLZ5jn JzgcyUzUxxJ1YTxDK0R97s94v3B5/uxYlOq/aS0Yzbps9PUrF1srRxg0iOEAhPbxS51d S47ZqyYtN2W8DpYqVUr/4h5wKtqQRKeGSPZrCzTxCnMsbCzRpwc1l4782wfh/zzqMogI OSsW3clZlluO2pRLq1H1HJkEJravVv/FmYuasumfQBIDxjfzG5yeN/kc9BeHT1bYp4sl y8QyrcwM8bdJ5tlhDgMYS+x2eu+C/sYVohrpq3z8S0OIAgzI4ISM2yCYYmsYqy4PRUbQ 6Yeg== 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=eyYD7jlS/XXc4l62zDNcV0EYcb/HonKMtBZT2C4iCVY=; b=XbG3zYqNwtZ474+M1u/v/8T4UH5Strfm12tUBCSgGwngmsn4/PX5AHL7njhToOLIee hmxX7NOT/CKLGovjhFh9PkeQ+zDQdr9TMr0e+wk+uH8wimuaQFvi+nAChLjtxSYuMjjS HH/pC7GmlUpGm6mK6CUGigFeE/Cm4g71ukWvuzqsFMtdxtGzV1sLYWkgdvySY/OZVcjN jr3DGy8X0dtuZ/DwxdCwYrt9BunFJZAWimxDHqgJKb9rAEmbNrzE99mTDrovfJmxJxZ8 jX3g4467QhWnkyLf5WtRIZgy0OYynh/rUa1gOggxen6D3IZyvu5QV68PT71H+JmIzy7A a8Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hAVM+kAg; 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 s17-v6si33882331pge.209.2018.11.02.11.41.14; Fri, 02 Nov 2018 11:41:28 -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=hAVM+kAg; 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 S1729331AbeKCDs3 (ORCPT + 99 others); Fri, 2 Nov 2018 23:48:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbeKCDs3 (ORCPT ); Fri, 2 Nov 2018 23:48:29 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.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 479AC20837; Fri, 2 Nov 2018 18:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184017; bh=VrjJn/SarbwQR/adGZEFUShxB09Jiu6YeTVWgfRWbmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hAVM+kAg6Y7WFBUQNRvZOX6cYdQeU04YoIO4RXrVx/ZceionlijnHUXVkpOKzkCjv hbtbSCiMmb/mIZ5AUaLWd0gZbhR9LBcfopHq2BD6Zv/tCLUCSUiA6VSQSajgJsCMSq xMUxZgWwdGyag1f/wdk0ymwEPPsu31xOTLZDMCmU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Christopherson , Liran Alon , Paolo Bonzini , Sasha Levin Subject: [PATCH 4.18 051/150] KVM: x86: Do not use kvm_x86_ops->mpx_supported() directly Date: Fri, 2 Nov 2018 19:33:33 +0100 Message-Id: <20181102182907.053587529@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 503234b3fdcaa578395c07e393ea3e5d13958824 ] Commit a87036add092 ("KVM: x86: disable MPX if host did not enable MPX XSAVE features") introduced kvm_mpx_supported() to return true iff MPX is enabled in the host. However, that commit seems to have missed replacing some calls to kvm_x86_ops->mpx_supported() to kvm_mpx_supported(). Complete original commit by replacing remaining calls to kvm_mpx_supported(). Fixes: a87036add092 ("KVM: x86: disable MPX if host did not enable MPX XSAVE features") Suggested-by: Sean Christopherson Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ea691ddfc3aa..2e23fce5eb1f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -11567,7 +11567,7 @@ static void prepare_vmcs02_full(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) set_cr4_guest_host_mask(vmx); - if (vmx_mpx_supported()) + if (kvm_mpx_supported()) vmcs_write64(GUEST_BNDCFGS, vmcs12->guest_bndcfgs); if (enable_vpid) { diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 97fcac34e007..3cd58a5eb449 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4625,7 +4625,7 @@ static void kvm_init_msr_list(void) */ switch (msrs_to_save[i]) { case MSR_IA32_BNDCFGS: - if (!kvm_x86_ops->mpx_supported()) + if (!kvm_mpx_supported()) continue; break; case MSR_TSC_AUX: -- 2.17.1