Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7059CC433F5 for ; Thu, 25 Nov 2021 15:03:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234427AbhKYPGO (ORCPT ); Thu, 25 Nov 2021 10:06:14 -0500 Received: from ppsw-42.csi.cam.ac.uk ([131.111.8.142]:49208 "EHLO ppsw-42.csi.cam.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351482AbhKYPEO (ORCPT ); Thu, 25 Nov 2021 10:04:14 -0500 X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: https://help.uis.cam.ac.uk/email-scanner-virus Received: from hades.srcf.societies.cam.ac.uk ([131.111.179.67]:33686) by ppsw-42.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.138]:25) with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mqGET-0004Mx-8Z (Exim 4.95) (return-path ); Thu, 25 Nov 2021 15:00:17 +0000 Received: from [192.168.1.10] (host-92-12-61-86.as13285.net [92.12.61.86]) (Authenticated sender: amc96) by hades.srcf.societies.cam.ac.uk (Postfix) with ESMTPSA id 454E51FBFC; Thu, 25 Nov 2021 15:00:17 +0000 (GMT) Message-ID: <3c922d47-9eab-5150-f4c6-3db40a77599a@srcf.net> Date: Thu, 25 Nov 2021 15:00:16 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-GB To: Juergen Gross , xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: peterz@infradead.org, Boris Ostrovsky , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , kernel test robot References: <20211125092056.24758-1-jgross@suse.com> <20211125092056.24758-2-jgross@suse.com> From: Andrew Cooper Subject: Re: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline In-Reply-To: <20211125092056.24758-2-jgross@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/11/2021 09:20, Juergen Gross wrote: > HYPERVISOR_get_debugreg() is being called from noinstr code, so it > should be attributed "always_inline". > > Fixes: f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr") > Reported-by: kernel test robot > Signed-off-by: Juergen Gross > --- > arch/x86/include/asm/xen/hypercall.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h > index 0575f5863b7f..28ca1119606b 100644 > --- a/arch/x86/include/asm/xen/hypercall.h > +++ b/arch/x86/include/asm/xen/hypercall.h > @@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value) > return _hypercall2(int, set_debugreg, reg, value); > } > > -static inline unsigned long > +static __always_inline unsigned long > HYPERVISOR_get_debugreg(int reg) > { > return _hypercall1(unsigned long, get_debugreg, reg); All this is going to do is push the error one step further in. Next, objtool will complain that hypercall_page isn't noinstr. ~Andrew