Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8240640imu; Fri, 28 Dec 2018 13:29:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN685mt4T36G/VFnz8eId3KdBG0C5FkxMKuS9crJ9R23KlDcEL0HYaFbfuVR3aXyRQ2qQYDG X-Received: by 2002:a17:902:108a:: with SMTP id c10mr16883586pla.131.1546032550118; Fri, 28 Dec 2018 13:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546032550; cv=none; d=google.com; s=arc-20160816; b=OXwbheV70EgA5smtOIT+CbKnbBXguFdeJ0xozkrFTITeOlbkgBcAgs+RmMuO25vGQN ZySPLmgwLbjt51aNLczOEf8XoRYm855Ug/q5TB5KiMPzLeOfE4I0vlWhLB/a7wK08MhM A5ztH4sL/thC7ye28DEaIGRuxCDnEkikWxOA97XhWlRCv5TAezt5gbL89Z/P9a8zSIKF xbaavsz7tODxH9DUC+T0CW6JFN9bQO7DMg+2lYRmXeo6x73P2NsqhLYZrPl23Sq56xqq BZKnW4vRMfDqkrcvxEIhWB8G7x8KmxOx51rbPZfQj49zGSB+LgfqW1iWT5NW4Q+WgjOB 9Ijw== 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=fDvAeG86IGkZRZLpIy9M1rrnAapOQEZHHaWyr9VcpDQ=; b=Eh6HY0ylo1bW1j5Uu2xg5uEZOXjl5i3lIkC7jafRmnVc5Q0DvBPiLswgk9uAPesIVs SSE92mMqRE+2J1MMdM/L3DZiDLO5K/SduLsO4yoZCcWWuL+eN76YPn705biEs/pOREMX /eA+JQeJbgxPPc/3WyxaO8tRcZpWZAhTjstN8W7oYi2G2fXG0y5JxhX0XKB21sVEb8zz QDp5hyvy+WQgtsOoFINKu7NeJaWYaIee+jpT87URUgyoaMzizV95cLcZXlXKrGiRU3iv lSbrRRLGUA7sI+i85J7ZaB5+gdr25iK1V4derY7a7vg7mSPo2sDgFtoVMQNb+pOpjB64 l7hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KhSZd+Bt; 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 x1si19668104pfn.111.2018.12.28.13.28.55; Fri, 28 Dec 2018 13:29:10 -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=KhSZd+Bt; 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 S1732364AbeL1Lxt (ORCPT + 99 others); Fri, 28 Dec 2018 06:53:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:53610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732336AbeL1Lxp (ORCPT ); Fri, 28 Dec 2018 06:53:45 -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 DE1B42184B; Fri, 28 Dec 2018 11:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545998024; bh=8bUjnpgTLAKQAsYW9pHIKnqdDPUse3rBj51YH2XJphc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KhSZd+BtS1nz4Mzfz0pEO90idTdV/UF/O+p0MrwsUBGdotfobU4yUKXVTraJB1Chu 9W+MwJIqh8MmzlP/sqVgP1pQ5GO+hVzI3R30eAXuHfOOttwA+nzVq/SjRryx1K+wnk sY+ejmTFOkgXMEnFSBXHxoDmqxA4VR3d2GgrVJb4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eduardo Habkost , Paolo Bonzini Subject: [PATCH 4.19 22/46] kvm: x86: Add AMDs EX_CFG to the list of ignored MSRs Date: Fri, 28 Dec 2018 12:52:16 +0100 Message-Id: <20181228113126.062523818@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181228113124.971620049@linuxfoundation.org> References: <20181228113124.971620049@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eduardo Habkost commit 0e1b869fff60c81b510c2d00602d778f8f59dd9a upstream. Some guests OSes (including Windows 10) write to MSR 0xc001102c on some cases (possibly while trying to apply a CPU errata). Make KVM ignore reads and writes to that MSR, so the guest won't crash. The MSR is documented as "Execution Unit Configuration (EX_CFG)", at AMD's "BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h Models 00h-0Fh Processors". Cc: stable@vger.kernel.org Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/msr-index.h | 1 + arch/x86/kvm/x86.c | 2 ++ 2 files changed, 3 insertions(+) --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -389,6 +389,7 @@ #define MSR_F15H_NB_PERF_CTR 0xc0010241 #define MSR_F15H_PTSC 0xc0010280 #define MSR_F15H_IC_CFG 0xc0011021 +#define MSR_F15H_EX_CFG 0xc001102c /* Fam 10h MSRs */ #define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2343,6 +2343,7 @@ int kvm_set_msr_common(struct kvm_vcpu * case MSR_AMD64_PATCH_LOADER: case MSR_AMD64_BU_CFG2: case MSR_AMD64_DC_CFG: + case MSR_F15H_EX_CFG: break; case MSR_IA32_UCODE_REV: @@ -2638,6 +2639,7 @@ int kvm_get_msr_common(struct kvm_vcpu * case MSR_AMD64_BU_CFG2: case MSR_IA32_PERF_CTL: case MSR_AMD64_DC_CFG: + case MSR_F15H_EX_CFG: msr_info->data = 0; break; case MSR_F15H_PERF_CTL0 ... MSR_F15H_PERF_CTR5: