Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933544AbeALM2j (ORCPT + 1 other); Fri, 12 Jan 2018 07:28:39 -0500 Received: from mail.skyhub.de ([5.9.137.197]:41836 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932993AbeALM2i (ORCPT ); Fri, 12 Jan 2018 07:28:38 -0500 Date: Fri, 12 Jan 2018 13:28:23 +0100 From: Borislav Petkov To: Ashok Raj Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Dave Hansen , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , David Woodhouse , Peter Zijlstra , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick Subject: Re: [PATCH 1/5] x86/ibrs: Introduce native_rdmsrl, and native_wrmsrl Message-ID: <20180112122823.dpljcyh7lonsmm2h@pd.tnic> References: <1515720739-43819-1-git-send-email-ashok.raj@intel.com> <1515720739-43819-2-git-send-email-ashok.raj@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1515720739-43819-2-git-send-email-ashok.raj@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 05:32:15PM -0800, Ashok Raj wrote: > - Remove including microcode.h, and use native macros from asm/msr.h > - added license header for spec_ctrl.c > > Signed-off-by: Ashok Raj > --- > arch/x86/include/asm/spec_ctrl.h | 17 ++++++++++++++++- > arch/x86/kernel/cpu/spec_ctrl.c | 1 + > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/spec_ctrl.h b/arch/x86/include/asm/spec_ctrl.h > index 948959b..2dfa31b 100644 > --- a/arch/x86/include/asm/spec_ctrl.h > +++ b/arch/x86/include/asm/spec_ctrl.h > @@ -3,12 +3,27 @@ > #ifndef _ASM_X86_SPEC_CTRL_H > #define _ASM_X86_SPEC_CTRL_H > > -#include > +#include > +#include > > void spec_ctrl_scan_feature(struct cpuinfo_x86 *c); > void spec_ctrl_unprotected_begin(void); > void spec_ctrl_unprotected_end(void); > > +static inline u64 native_rdmsrl(unsigned int msr) > +{ > + u64 val; > + > + val = __rdmsr(msr); > + > + return val; > +} There's no need to add new ones but simply lift the ones from microcode.h and use them. No duplication of *MSR functions pls. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.