From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751776AbbIQLjf (ORCPT ); Thu, 17 Sep 2015 07:39:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54909 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbbIQLjd (ORCPT ); Thu, 17 Sep 2015 07:39:33 -0400 Subject: Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops To: Borislav Petkov , Ingo Molnar References: <20150917071920.GA14296@gmail.com> <20150917093134.GC12316@nazgul.tnic> Cc: Andy Lutomirski , x86@kernel.org, Peter Zijlstra , KVM list , Arjan van de Ven , xen-devel , linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Peter Zijlstra , Andrew Morton , "H. Peter Anvin" From: Paolo Bonzini X-Enigmail-Draft-Status: N1110 Message-ID: <55FAA66E.1070401@redhat.com> Date: Thu, 17 Sep 2015 13:39:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150917093134.GC12316@nazgul.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/09/2015 11:31, Borislav Petkov wrote: > >> > Crashing the bootup on an unknown MSR is bad. Many MSR reads and writes are >> > non-critical and returning the 'safe' result is much better than crashing or >> > hanging the bootup. > ... and prepending all MSR accesses with feature/CPUID checks is probably almost > impossible. That's not a big deal, that's what *_safe is for. The problem is that there are definitely some cases where the *_safe version is not being used. I agree with Ingo that we should start with a WARN. For example: - give the read_msr and write_msr hooks the same prototype as the safe variants - make the virt platforms always return "no error" for the unsafe variants (I understand if your first reaction is "ouch", but this effectively is already the current behavior) - change rdmsr/wrmsr/rdmsrl/wrmsrl to WARN if the read_msr and write_msr hooks return an error Paolo