From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbcDCNX6 (ORCPT ); Sun, 3 Apr 2016 09:23:58 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:32895 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751724AbcDCNX4 (ORCPT ); Sun, 3 Apr 2016 09:23:56 -0400 MIME-Version: 1.0 In-Reply-To: <20160403084129.GB19007@pd.tnic> References: <9ee3fb6a196a514c93325bdfa15594beecf04876.1459605520.git.luto@kernel.org> <20160403084129.GB19007@pd.tnic> From: Andy Lutomirski Date: Sun, 3 Apr 2016 06:23:36 -0700 Message-ID: Subject: Re: [PATCH v5 5/9] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks To: Borislav Petkov Cc: Andy Lutomirski , X86 ML , Paolo Bonzini , Peter Zijlstra , KVM list , Arjan van de Ven , xen-devel , "linux-kernel@vger.kernel.org" , Linus Torvalds , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 3, 2016 at 1:41 AM, Borislav Petkov wrote: > On Sat, Apr 02, 2016 at 07:01:36AM -0700, Andy Lutomirski wrote: >> These hooks match the _safe variants, so name them accordingly. >> This will make room for unsafe PV hooks. >> >> Signed-off-by: Andy Lutomirski >> --- >> arch/x86/include/asm/paravirt.h | 33 +++++++++++++++++---------------- >> arch/x86/include/asm/paravirt_types.h | 8 ++++---- >> arch/x86/kernel/paravirt.c | 4 ++-- >> arch/x86/xen/enlighten.c | 4 ++-- >> 4 files changed, 25 insertions(+), 24 deletions(-) > > ... > >> diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h >> index 77db5616a473..5a06cccd36f0 100644 >> --- a/arch/x86/include/asm/paravirt_types.h >> +++ b/arch/x86/include/asm/paravirt_types.h >> @@ -155,10 +155,10 @@ struct pv_cpu_ops { >> void (*cpuid)(unsigned int *eax, unsigned int *ebx, >> unsigned int *ecx, unsigned int *edx); >> >> - /* MSR, PMC and TSR operations. >> - err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ >> - u64 (*read_msr)(unsigned int msr, int *err); >> - int (*write_msr)(unsigned int msr, unsigned low, unsigned high); >> + /* MSR operations. >> + err = 0/-EIO. wrmsr returns 0/-EIO. */ > > Please reformat this comment properly, while you're at it: > > /* > * A sentence. > * Another sentence. > */ You already caught that one. It's fixed in "x86/paravirt: Add paravirt_{read,write}_msr". Congrats on being deterministic :) --Andy