Received: by 10.213.65.68 with SMTP id h4csp264401imn; Wed, 28 Mar 2018 03:10:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+6IEslWKfDP50JAmVaacFcr2RPDq+g2Q+lqdPz8NEUZ+k2fxPaC2134J61YFaZPutMw36J X-Received: by 10.99.111.140 with SMTP id k134mr2145049pgc.11.1522231842426; Wed, 28 Mar 2018 03:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522231842; cv=none; d=google.com; s=arc-20160816; b=EFppB0SC5g9dQyH0N0PXnOxOBa5wYp49nJxgyOAtz9FdXU+H3fLfl1KxtLLvSTtsaB dkZikSUw7h9Xe+J9bsKR3YrrWb6UJJ/eGFEkTPtxdRUiXjpTJh6sszToXAShEAHStI+e TzjqZPWQez8FKv0wtLuM+DTgQ3AuUrBlqkcOoHmGocjKbkgFkedvbziyKePENaMO02LM m33co7h6rA1UDQaqYfZGfuHkKYu4InT/IsjyQ1MS6loiKLimkcnpieJJskJk3cRsF2yf OkAtUf6o2qXh5+yso7Wo+vcII9oTpwWy3N5zEJt3ZrmHy41e7WN+nfKc+5oCt/fU52rH Yczg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=z5d++9RWfu8W8Rz+eDrXSjuEwpMkL+vEyfEEyGaaEAU=; b=aOAb4e1vSaEBV0/93iyL3nszZR9vdsd4neFvpQIpmIcMym/7LZp/yt/4tOLsNZgntz F8G+H/J+bac5YQEWsP/GRMUkt0h+vW7+6BhnWO/6HEcItBQ1pf/3JFCFESHUWBOnp8iU FtUG8ycfQQDLDk8SjOraLXh74iyMcqKvyyncT/rDc0P1BXkHFVw02JAuNUzygqrNjTqg TraVzCfdlFe69HeQPuqorpd0UX3ftUM2xwFvzwjsKvSHvFbzTN4Ck+mBtUmNMKspDWQn oudGU9dii2W3V+j1LJLpUQRO7Izdp5Qnrv88AL/iYMqrkZR6rc5n1OVZ45GMn5FljPc1 S9wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8-v6si3634314plm.120.2018.03.28.03.10.27; Wed, 28 Mar 2018 03:10:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752870AbeC1KJj (ORCPT + 99 others); Wed, 28 Mar 2018 06:09:39 -0400 Received: from mail.skyhub.de ([5.9.137.197]:39082 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752273AbeC1KJi (ORCPT ); Wed, 28 Mar 2018 06:09:38 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YvP9ucQ3CPwX; Wed, 28 Mar 2018 12:09:21 +0200 (CEST) Received: from pd.tnic (p200300EC2BC91000C8A6EDA20E8964B3.dip0.t-ipconnect.de [IPv6:2003:ec:2bc9:1000:c8a6:eda2:e89:64b3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DC6B01EC0077; Wed, 28 Mar 2018 12:09:20 +0200 (CEST) Date: Wed, 28 Mar 2018 12:08:44 +0200 From: Borislav Petkov To: Eric Dumazet Cc: x86 , lkml , Eric Dumazet , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH] x86, msr: fix rdmsrl_safe_on_cpu() Message-ID: <20180328100844.GA20533@pd.tnic> References: <20180328032233.153055-1-edumazet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180328032233.153055-1-edumazet@google.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27, 2018 at 08:22:33PM -0700, Eric Dumazet wrote: > When changing rdmsr_safe_on_cpu() to schedule, I missed that > __rdmsr_safe_on_cpu() was also used by rdmsrl_safe_on_cpu() > > Lets make rdmsrl_safe_on_cpu() a wrapper instead of copy/pasting > the code I added for the completion handling. > > Fixes: 07cde313b2d2 ("x86/msr: Allow rdmsr_safe_on_cpu() to schedule") > Signed-off-by: Eric Dumazet > Reported-by: kbuild test robot > Cc: "H. Peter Anvin" > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > --- > arch/x86/lib/msr-smp.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c > index 761ba062afdaf7f7d0603ed94ed6cc3e46b37f76..fee8b9c0520c9954e3cf9093332e1a9b53009b8b 100644 > --- a/arch/x86/lib/msr-smp.c > +++ b/arch/x86/lib/msr-smp.c > @@ -225,16 +225,13 @@ EXPORT_SYMBOL(wrmsrl_safe_on_cpu); > > int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) > { > + u32 low, high; > int err; > - struct msr_info rv; > > - memset(&rv, 0, sizeof(rv)); > + err = rdmsr_safe_on_cpu(cpu, msr_no, &low, &high); > + *q = (u64)high << 32 | low; > > - rv.msr_no = msr_no; > - err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu, &rv, 1); > - *q = rv.reg.q; > - > - return err ? err : rv.err; > + return err; > } > EXPORT_SYMBOL(rdmsrl_safe_on_cpu); > > -- I guess now that the rdmsr* side does this, you probably should convert the wrmsr* side as well. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.