Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933170AbeALBwe (ORCPT + 1 other); Thu, 11 Jan 2018 20:52:34 -0500 Received: from mga14.intel.com ([192.55.52.115]:21626 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbeALBwc (ORCPT ); Thu, 11 Jan 2018 20:52:32 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,347,1511856000"; d="scan'208";a="20959723" Date: Thu, 11 Jan 2018 17:52:31 -0800 From: "Raj, Ashok" To: Andy Lutomirski Cc: LKML , Thomas Gleixner , Tim Chen , 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 , ashok.raj@intel.com Subject: Re: [PATCH 1/5] x86/ibrs: Introduce native_rdmsrl, and native_wrmsrl Message-ID: <20180112015231.GA44418@otc-nc-03> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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:41:34PM -0800, Andy Lutomirski wrote: > On Thu, Jan 11, 2018 at 5:32 PM, 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 [snip] > > +static inline u64 native_rdmsrl(unsigned int msr) > > +{ > > + u64 val; > > + > > + val = __rdmsr(msr); > > + > > + return val; > > +} > > What's wrong with native_read_msr()? Yes, i think i should have added to msr.h. The names didn't read as a pair, one was native_read_msr, wrmsrl could be taken over when paravirt is defined? > > > + > > +static inline void native_wrmsrl(unsigned int msr, u64 val) > > +{ > > + __wrmsr(msr, (u32) (val & 0xffffffffULL), (u32) (val >> 32)); > > +} > > What's wrong with just wrmsrl()? If you really need a native helper > like this, please add it to arch/x86/asm/msr.h. I should have done that.. will move these to msr.h instead. Cheers, Ashok