From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755333AbbCLRc1 (ORCPT ); Thu, 12 Mar 2015 13:32:27 -0400 Received: from mail.skyhub.de ([78.46.96.112]:38802 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755181AbbCLRcX (ORCPT ); Thu, 12 Mar 2015 13:32:23 -0400 Date: Thu, 12 Mar 2015 18:30:56 +0100 From: Borislav Petkov To: Joel Schopp Cc: "Luck, Tony" , "jesse.larrew@amd.com" , "x86@kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mce: use safe MSR accesses Message-ID: <20150312173056.GD25505@pd.tnic> References: <1426111778-17942-1-git-send-email-jesse.larrew@amd.com> <3908561D78D1C84285E8C5FCA982C28F32A0E42D@ORSMSX113.amr.corp.intel.com> <5501CAC7.6090306@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5501CAC7.6090306@amd.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2015 at 12:20:07PM -0500, Joel Schopp wrote: > These MSRs don't make sense in guest mode. The real question is if we > fix that in KVM, here, or both. I'm a fan of fixing it in both places. > Xen's behavior is to return a value of 0 if the guest tries to access > these, that seems like a reasonable thing to do in KVM as well. I am > volunteering myself to write that patch for KVM, but I would encourage This should be first and foremost fixed in KVM as it is KVM which is advertizing MCA CPUID feature and the guest simply uses it with all MSRs which belong to it. > accepting an updated version of this patch as well. If you want to do that, I'd suggest using the error checking variants in arch/x86/lib/msr.c which should also facilitate toggling of bits in MSRs. > Initializing val to 0 where it is declared should have the desired > effect. Yes, as long as KVM returns 0 for MC4_MISC0/1. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --