From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH 03/11] x86/fpu: make __raw_xsave_addr() use feature number instead of mask Date: Wed, 17 Oct 2018 12:01:43 +0200 Message-ID: <20181017100143.GD22535@zn.tnic> References: <20181004140547.13014-1-bigeasy@linutronix.de> <20181004140547.13014-4-bigeasy@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" , Rik van Riel , Dave Hansen To: Sebastian Andrzej Siewior Return-path: Content-Disposition: inline In-Reply-To: <20181004140547.13014-4-bigeasy@linutronix.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Oct 04, 2018 at 04:05:39PM +0200, Sebastian Andrzej Siewior wrote: > Most users of __raw_xsave_addr() use a feature number, shift it to a > mask and then __raw_xsave_addr() shifts it back to the feature number. > > Make __raw_xsave_addr() use the feature number as argument. > > Signed-off-by: Sebastian Andrzej Siewior > --- > arch/x86/kernel/fpu/xstate.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c > index 87a57b7642d36..38d0b5ea40425 100644 > --- a/arch/x86/kernel/fpu/xstate.c > +++ b/arch/x86/kernel/fpu/xstate.c > @@ -811,10 +811,8 @@ void fpu__resume_cpu(void) > * > * Note: does not work for compacted buffers. > */ > -void *__raw_xsave_addr(struct xregs_state *xsave, int xstate_feature_mask) > +void *__raw_xsave_addr(struct xregs_state *xsave, int feature_nr) Don't forget to update the comment above it too - it still says "mask". Otherwise nice. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.