Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967070AbeAORSS (ORCPT + 1 other); Mon, 15 Jan 2018 12:18:18 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:56866 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934862AbeAORSP (ORCPT ); Mon, 15 Jan 2018 12:18:15 -0500 Subject: Re: [PATCH 2/6] x86/xen: Mark pv stub assembler symbol visible To: Andi Kleen , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Andi Kleen , Thomas Gleixner References: <20171222001821.2157-1-andi@firstfloor.org> <20171222001821.2157-3-andi@firstfloor.org> From: Boris Ostrovsky Message-ID: <27a1722e-8702-9ea6-bdc0-ef10dfc5b2b5@oracle.com> Date: Mon, 15 Jan 2018 12:17:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171222001821.2157-3-andi@firstfloor.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8775 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801150245 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 12/21/2017 07:18 PM, Andi Kleen wrote: > From: Andi Kleen > > With LTO any external assembler symbol has to be marked __visible. > Mark the generated asm PV stubs __visible to prevent a linker error. > > Signed-off-by: Andi Kleen Reviewed-by: Boris Ostrovsky > --- > arch/x86/include/asm/paravirt.h | 3 ++- > drivers/xen/time.c | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h > index 892df375b615..f03445fbbe2f 100644 > --- a/arch/x86/include/asm/paravirt.h > +++ b/arch/x86/include/asm/paravirt.h > @@ -745,7 +745,8 @@ static __always_inline bool pv_vcpu_is_preempted(long cpu) > */ > #define PV_THUNK_NAME(func) "__raw_callee_save_" #func > #define PV_CALLEE_SAVE_REGS_THUNK(func) \ > - extern typeof(func) __raw_callee_save_##func; \ > + extern __visible typeof(func) __raw_callee_save_##func; \ > + extern __visible typeof(func) func; \ > \ > asm(".pushsection .text;" \ > ".globl " PV_THUNK_NAME(func) ";" \ > diff --git a/drivers/xen/time.c b/drivers/xen/time.c > index 3e741cd1409c..708a00c337d7 100644 > --- a/drivers/xen/time.c > +++ b/drivers/xen/time.c > @@ -144,7 +144,7 @@ void xen_get_runstate_snapshot(struct vcpu_runstate_info *res) > } > > /* return true when a vcpu could run but has no real cpu to run on */ > -bool xen_vcpu_stolen(int vcpu) > +__visible bool xen_vcpu_stolen(int vcpu) > { > return per_cpu(xen_runstate, vcpu).state == RUNSTATE_runnable; > } >