From nobody Sun Feb 8 20:09:33 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1568025899; cv=none; d=zoho.com; s=zohoarc; b=WmOvjNoWV6hyfs8XIsqWouiyY+MDdK0m7bC2xbejH/aUkBAWJc9SGi8LfR9FevG/7uX8kDeNFJAb88M56MFX+MtFKwDduZgToLxeYx+bbadA57CkK9Z/KjPb+y4Yy3pRvgjF8/JxZHXBj8kovB93EnFUzztlMsy+el6IUHT1gR0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568025899; 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=2XBxotO3+cKRpZIDTZNbIX5lfwiBc6KMHmPj9E2lQ8s=; b=d6KO8f/6PZAnsa1WQ/sCGgwMpHPJW98+AI77YfQirpqFbkgF1O+8THkVM7vJ7HZT3up67wO/T8hvEsuYLsvk62oo98R57DOFcuNCjeCn7tj9Mh/O2zfAHT0ziM/0rseylQSNFm41Hcq1fSfkdpZb4kuphyfF02g8VeuGU6s9Vyc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1568025899662127.63627842800224; Mon, 9 Sep 2019 03:44:59 -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 1i7H9J-00052V-KS; Mon, 09 Sep 2019 10:43:57 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7H9I-00052N-89 for xen-devel@lists.xenproject.org; Mon, 09 Sep 2019 10:43:56 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b772abca-d2ee-11e9-ac0a-12813bfff9fa; Mon, 09 Sep 2019 10:43:55 +0000 (UTC) X-Inumbo-ID: b772abca-d2ee-11e9-ac0a-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568025835; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UZ3w1RsyzCoDE9rbW8tVbPzX87EZjHqwYNEfofyZV+M=; b=GKsaeAe8xN/qf7xg4bdThZdMu+x27D28tGeVISwQX47m4mMRUEHlKQEZ 0ja92xzWWrhbFw3aF5p1qRTIb3eWuXhiJLIizmKEOt8erWyaAM7uQAbco QscYjlLCTZ/Wapsd9PDzJTwZQ14isKIlaJVaG0zIJxvHXZzYVsYUCIpvo E=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com 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 (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@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:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: NkxXeVA1t5YovxisE3J8OlVeoXdbvHZ688cfYnhNNcvratVAQcR3UvZVTqoc+A+fAs5ydQwneI 9JLSRlY4q1O88PwYRpBOZAZarozaBcz5nsR89aXewnt/Wk/Xq3s87zKaqWfL8GdqSEGn3XFAyA WmcsQBahD+HEjJXmRcJyJoXWQZx0k+HBdP1mKJtQM3vTkkDkJF2m/G2cKiUvw6BSiUQoAGfOPK R4LWGkwFYwf4vvXPKXokmiH/PkrPx7D8BzaqTwsFXJyGgXRsmgAidKxtdhu8pjpScmjA7Ffvji /78= X-SBRS: 2.7 X-MesageID: 5543761 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,484,1559534400"; d="scan'208";a="5543761" From: Andrew Cooper To: Xen-devel Date: Mon, 9 Sep 2019 11:43:51 +0100 Message-ID: <20190909104351.13444-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/boot: Improve code generation from bootsym() 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 , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The code generation for bootsym() is atrocious, and unnecesserily complicated. Given the appropriate physical address, all we need is to construct a virtual address of the appropriate type. add/remove: 0/0 grow/shrink: 0/9 up/down: 0/-4256 (-4256) Function old new delta kexec_reserve_area.constprop 165 159 -6 reset_videomode_after_s3 231 70 -161 identify_cpu 1341 1176 -165 parse_acpi_sleep 408 240 -168 early_init_intel 632 440 -192 __cpu_up 1983 1682 -301 do_platform_op 6469 5526 -943 compat_platform_op 6433 5482 -951 __start_xen 12939 11570 -1369 Total: Before=3D3341298, After=3D3337042, chg -0.13% No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/include/asm-x86/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index f950247029..dab7d7bade 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -91,8 +91,8 @@ extern unsigned long trampoline_phys; #define bootsym_phys(sym) \ (((unsigned long)&(sym)-(unsigned long)&trampoline_start)+trampoline_p= hys) #define bootsym(sym) \ - (*RELOC_HIDE((typeof(&(sym)))__va(__pa(&(sym))), \ - trampoline_phys-__pa(trampoline_start))) + (*((typeof(sym) *)__va(bootsym_phys(sym)))) + extern char trampoline_start[], trampoline_end[]; extern char trampoline_realmode_entry[]; extern unsigned int trampoline_xen_phys_start; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel