From nobody Sun Apr 28 14:59:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1558543192; cv=none; d=zoho.com; s=zohoarc; b=VJt9h76zR+Zd+Js6gYV6gLIQMCAo0ibTu7tABxrp+etQfNCjoJh4iVnczB53lYFLqadlkptFoSqZjWSDAroKAvyWGXfkGYxSzul7dMSj5e3UoypQ0vO0mYTASxAsyakihKPdMIelvAdy15GLyaAv3W+0tE9GqWa8fbuQBx85fLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558543192; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=13E1wXtteRmVQSJn0cCCFwu+qTJZjGac9+clD+D2rYI=; b=P2gZwdcsnHiwGre0EuSfvGn9GCitkbj54U9ieDMIB2Ntohp2tKWBz+4ldPgoMAZSNebJL5mfF+5a2NRdaz+ZJrnZY9d+3jrUthnHHSuTK69ZiItIs9g1r6X/F3VB6GqtFtl93DLDEW0i2LV057tAXE20BPr9WzKSiSqUXu9rrZU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155854319143583.88492697025788; Wed, 22 May 2019 09:39:51 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hTUFs-0006vn-Aa; Wed, 22 May 2019 16:38:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hTUFr-0006vi-LW for xen-devel@lists.xenproject.org; Wed, 22 May 2019 16:38:15 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id fe4e8f70-7caf-11e9-8980-bc764e045a96; Wed, 22 May 2019 16:38:14 +0000 (UTC) X-Inumbo-ID: fe4e8f70-7caf-11e9-8980-bc764e045a96 Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL02.citrite.net Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:23.29.105.83 ip4:162.221.156.83 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL02.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@MIAPEX02MSOL02.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: Afq6XL14lvT2iD4tUpJ5NkrejcCPjo6oUux8dX00EA8b+T8NAA1EFBQRzOEUPzkMZxdlxrPARW YL+H0zuaIJGV2S5DDV5Yt598yx5PRSKL9GdqxVF5i10wOaZRnO2NNNamxelHkt6DTYSKonBslU hNyS++ikkE4qkT4fL9Fja1BvF8LnBxyJ7a2SxA9xVpym2H0q1rMlmlglN1ipB7yx6D5bpBn071 pWhYKAv1sIocA3Uz5bL168ho8XWxidDBZ+KQBciVyaw7hgEHn7M9pxwZlpBinu1bpvRPbBrx5l Qyc= X-SBRS: 2.7 X-MesageID: 781398 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,499,1549947600"; d="scan'208";a="781398" From: Roger Pau Monne To: Date: Wed, 22 May 2019 17:38:10 +0100 Message-ID: <20190522163810.32964-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86: fix alternative_callN X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" alternative_callN using inline assemble to generate the alternative patch sites should be using the ALTERNATIVE C preprocessor macro rather than the ALTERNATIVE assembly macro, the more that using the assembly macro in an inline assembly instance causes the following error on llvm based toolchains: :1:1: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:37: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:60: error: invalid reassignment of non-absolute variable = '.L0_diff' .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:2: note: while in macro instantiation ALTERNATIVE "call *genapic+64(%rip)", "call .", X86_FEATURE_LM ^ :1:156: error: invalid symbol redefinition ...- (.L0_orig_e - .L0_orig_s); mknops ((-(.L0_diff > 0)) * .L0_diff); .L= 0_orig_p: ^ :18:5: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ :18:26: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ :1:1: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:37: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:60: error: invalid reassignment of non-absolute variable = '.L0_diff' .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:2: note: while in macro instantiation ALTERNATIVE "call *genapic+64(%rip)", "call .", X86_FEATURE_LM ^ :1:156: error: invalid symbol redefinition ...- (.L0_orig_e - .L0_orig_s); mknops ((-(.L0_diff > 0)) * .L0_diff); .L= 0_orig_p: ^ :18:5: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ :18:26: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ :1:1: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:37: error: invalid symbol redefinition .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:60: error: invalid reassignment of non-absolute variable = '.L0_diff' .L0_orig_s: call *genapic+64(%rip); .L0_orig_e: .L0_diff =3D (.L0_repl_e1 -= .L0_repl_s1) - (... ^ :1:2: note: while in macro instantiation ALTERNATIVE "call *genapic+64(%rip)", "call .", X86_FEATURE_LM ^ :1:156: error: invalid symbol redefinition ...- (.L0_orig_e - .L0_orig_s); mknops ((-(.L0_diff > 0)) * .L0_diff); .L= 0_orig_p: ^ :18:5: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ :18:26: error: invalid symbol redefinition .L0_repl_s1: call .; .L0_repl_e1: ^ Fixes: 67d01cdb5 ("x86: infrastructure to allow converting certain indirect= calls to direct ones") Signed-off-by: Roger Pau Monn=C3=A9 --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/include/asm-x86/alternative.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/include/asm-x86/alternative.h b/xen/include/asm-x86/altern= ative.h index 63d0a450ba..92e3581bc2 100644 --- a/xen/include/asm-x86/alternative.h +++ b/xen/include/asm-x86/alternative.h @@ -202,9 +202,8 @@ extern void alternative_branches(void); rettype ret_; \ register unsigned long r10_ asm("r10"); \ register unsigned long r11_ asm("r11"); \ - asm volatile (__stringify(ALTERNATIVE "call *%c[addr](%%rip)", \ - "call .", \ - X86_FEATURE_ALWAYS) \ + asm volatile (ALTERNATIVE("call *%c[addr](%%rip)", "call .", \ + X86_FEATURE_ALWAYS) \ : ALT_CALL ## n ## _OUT, "=3Da" (ret_), \ "=3Dr" (r10_), "=3Dr" (r11_) ASM_CALL_CONSTRAINT \ : [addr] "i" (&(func)), "g" (func) \ --=20 2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel