Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2685279imj; Mon, 11 Feb 2019 07:01:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IYg2jW6y5vkSFdZrbaBePm8k7SD0XTJTT7sWNjgoc1ZLXaBeM2C5N7XqN0FrxCdLkbE9f3o X-Received: by 2002:a17:902:4225:: with SMTP id g34mr944394pld.152.1549897294059; Mon, 11 Feb 2019 07:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897294; cv=none; d=google.com; s=arc-20160816; b=07ODw5rSfWYYzsNIw2xauuZ6yLbAdnTi5lo58KPJLkh3WMK4oWTO3WMF35HOD9JDyh QdjCEim3CyAIPpboyoT0u2AQxxplMJZmp4Ngyx0Sn6HeV8xbWAtbvTdsX+ky/m2HwkPC rusT070ABZU3mF7judkHGyhz9ykBbBI9/KzVWPG9x3XxLnX/jvu60B2l4df/klIxcW2U uCls1V9VChMC/xmhZcvlTkv9YYfus9C1q+H8qNRk57emZ/FwieCYIfMgxGuqWMURsRPf 51KDh9S7P0IMhgaDb/YQ28ru8okN9T72j7ihD8vCF/znSOyrqzh7SDnwDOoE0L7bUaf5 PiEA== 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=bXfSCjXKJjEVHmC/yo2mXWUXEkIhrMseK0WkgNKkS2c=; b=yIdVeu+i085flWEN/n/xGcwUqo4Vzku4ZXa0kzXvVQv8Qr1sasyslI0mU2QKRQ/+Gp Dmu4kjWyFEpA7WsWyfR48iZT33FGo3Ke2w/F8QWfrmAQsgEirkareW5bvQCvwRQRg4Te QRLK3CB1q2WP2xmyir4ZXg0H1YV2RY7W5CCL9t7D8IK7qZswLRB2KsaMl05wgCSCpfxr Pjg5rX+CGjeYkun3ih5cMaHPt81lB9qJzbvihJ/8Gpc/I17WrT23W4bEDRu+U/tLuWQU cW3LuLCiydo7HWR2CumdVJMf4X3ewNVybaK6Hd4F8cl4sB4e/sfF36NxJn2e2CnB/66i /ABQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="G/iHRlnS"; 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 13si10329101pld.398.2019.02.11.07.01.16; Mon, 11 Feb 2019 07:01:34 -0800 (PST) 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="G/iHRlnS"; 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 S2390009AbfBKPA0 (ORCPT + 99 others); Mon, 11 Feb 2019 10:00:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:48322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389988AbfBKPAY (ORCPT ); Mon, 11 Feb 2019 10:00:24 -0500 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 C91AF206BA; Mon, 11 Feb 2019 15:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897224; bh=dGafsh2wilVnDuQ+G3ffU27oUPJGLRA38xBb4596vPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G/iHRlnSrLRUhqi4uqGlEexfBKtJ59zWxmjhYSM8yu3kvEGvaP0svxMKlSYGb/QqR OSK89tbY3MlVWdVsnMN/7eSkrjxdRpOOO2OpzStczQhJGPs9ik4+z3r9+QcxF9YYHk rT+EdFWLajlrZOUm1h5dubnZ+oVUkfTQ6Us3if6c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Sasha Levin Subject: [PATCH 4.14 132/205] KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported Date: Mon, 11 Feb 2019 15:18:50 +0100 Message-Id: <20190211141837.051415447@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit e87555e550cef4941579cd879759a7c0dee24e68 ] AMD doesn't seem to implement MSR_IA32_MCG_EXT_CTL and svm code in kvm knows nothing about it, however, this MSR is among emulated_msrs and thus returned with KVM_GET_MSR_INDEX_LIST. The consequent KVM_GET_MSRS, of course, fails. Report the MSR as unsupported to not confuse userspace. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Radim Krčmář Signed-off-by: Sasha Levin --- arch/x86/kvm/svm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4dc79d139810..656ac12f5439 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -5319,6 +5319,13 @@ static bool svm_cpu_has_accelerated_tpr(void) static bool svm_has_emulated_msr(int index) { + switch (index) { + case MSR_IA32_MCG_EXT_CTL: + return false; + default: + break; + } + return true; } -- 2.19.1