From nobody Thu May 9 03:51:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1705947471; cv=none; d=zohomail.com; s=zohoarc; b=i5Ipt90/4bLWTykTeaNCjZOtdUCL2D6PEWj9oguWVLnSDkn5h3xdCDZMO9sG09eGl7x4L4M9cus8rI7zsADbjJck2ZdEUFfJdxnIim/83TOB8197e6VZ/cROGuKOIFaWdU7e6sUd4LlM/M7U42Bv8KgmZtvALLqwMy8SgnIqLnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705947471; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qc/zDh4k00nRKu4eBLLg2sFYqmOjRTHk1BpthsHmuX8=; b=JW3RQtMgDURZWIcogXWpVcbu/kspJU15qmC/0xAiVQIBJlmZGcnCGdFGQh80msOca1+uqeOmmFICabjsDRCEhnRqIz65CML4cDyNJR4nFOIO+cOd/dKPOl/H1tO42my8FNfxerwYvMVq2KC9wceh+/Q52HPAu31zYjHxC+AcBOg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1705947471730570.4090878903805; Mon, 22 Jan 2024 10:17:51 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.670054.1042649 (Exim 4.92) (envelope-from ) id 1rRyrT-0002jG-4I; Mon, 22 Jan 2024 18:17:31 +0000 Received: by outflank-mailman (output) from mailman id 670054.1042649; Mon, 22 Jan 2024 18:17:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrS-0002ic-Tu; Mon, 22 Jan 2024 18:17:30 +0000 Received: by outflank-mailman (input) for mailman id 670054; Mon, 22 Jan 2024 18:17:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrS-0002ee-7u for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 18:17:30 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 80a42b0b-b952-11ee-98f2-6d05b1d4d9a1; Mon, 22 Jan 2024 19:17:29 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 80a42b0b-b952-11ee-98f2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1705947449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HFRrMhhOeGY2Gr1UMSgwTgZBg4tGjjmtfbyh4y4EHqU=; b=OtOw3HJSyQn/Nkm+n/l9kJyUpbf4iF7iWP+pQL3WLw3RnlQJrXKe+AvC CRJe+S1zGgvahZF9DpAKyVMK9tRQeuYNTXnvWVmSJ8aCpwhUfgnb8t2fB Xco5j4Q8+UXk01lazepQ2y3w8Pg4AfpwE234yuHokJXSEi+Dx1i2i29mG 8=; X-CSE-ConnectionGUID: FCbAE902SjqaC0PT4u4YkQ== X-CSE-MsgGUID: OnkEHIj2TSiL73DBDu9phg== Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 132366780 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:PWfb4q/5HpDMyDNvy+UVDrUD3X6TJUtcMsCJ2f8bNWPcYEJGY0x3z zNKXWmFbqyJZWr2fogkatmwpkoC7JDUnNRqGlQ4rn08E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjVAOK6UKidYnwZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ksy1BjOkGlA5ABmPKoS5AS2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklg3 vYxBWFVNCuBnuudmIqHFvQwt8caeZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUWGPEUn1lQ/UfrSmM+BgHXlfiIeg1WSvactuEDYzRBr0airO93QEjCPbZwOxB3G+ D2WpwwVBDk9Mt+y6RuHqE6Xh8uQxg/RdJ9DDL23o6sCbFq7mTVIVUx+uUGAiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXY0efBdDuk74wGl0bfP7kCSAW1sZiFFQMwrsokxXzNC/ lyOmcngCXpwsbmWYXWH/7yQoHW5Pi19EIMZTXZaF01fuYCl+dxiyE2XJjp+LEKrpvPeExjdk mjQlyonjp5LtfJXyvmK/mmS1lpAuaP1oh4JChT/Bz39s1IjNND9OuSVBU7nAeGsxbt1r2VtX 1BewqByFMhUUfmweNWlGY3h5o2B6fefKyH7ilVyBZQn/DnF0yf8Jd0AvmskdBkxbpZsldrVj Kj74F052XOuFCHyMf8fj3yZVazGMpQM5fy6D6uJP7Kik7B6dROd/TEGWHN8K1vFyRB2+YlmY MfzTCpZJSpCYUiR5GbsFrh1PH5C7nxW+F4/srinl0n6jODPNSD9pHVsGALmU93VJZis+G39m +uz/ePTo/mDeIUSuhXqzLM= IronPort-HdrOrdr: A9a23:e3arv6HrG1oFJQ5tpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5r mTdZUgpHnJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YZT0EUMrzN5DZB4voSmDPIceod/A== X-Talos-CUID: 9a23:5SLJpWP203BX8e5DdgJt3WNFQpoecGTU5y/oHxOlVVdqcejA X-Talos-MUID: =?us-ascii?q?9a23=3A8s9yQQ4L6miWseHlVPZB43alxoxP5aeDKGEPy6k?= =?us-ascii?q?9uu3bbgBaFyrMlDS4F9o=3D?= X-IronPort-AV: E=Sophos;i="6.05,211,1701147600"; d="scan'208";a="132366780" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [PATCH 1/3] x86/entry: Fix ELF metadata for NMI and handle_ist_exception Date: Mon, 22 Jan 2024 18:17:11 +0000 Message-ID: <20240122181714.1543738-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240122181714.1543738-1-andrew.cooper3@citrix.com> References: <20240122181714.1543738-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1705947472037100005 handle_ist_exception isn't part of the NMI handler, just like handle_except= ion isn't part of #PF. Fixes: b3a9037550df ("x86: annotate entry points with type and size") Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Konrad Rzeszutek Wilk CC: Ross Lagerwall --- xen/arch/x86/x86_64/entry.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 482c91d4f533..c3f6b667a72a 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -1023,7 +1023,9 @@ FUNC(entry_NMI) ENDBR64 pushq $0 movl $X86_EXC_NMI, 4(%rsp) -handle_ist_exception: +END(entry_NMI) + +FUNC(handle_ist_exception) ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP SAVE_ALL =20 @@ -1150,7 +1152,7 @@ handle_ist_exception: ASSERT_CONTEXT_IS_XEN jmp restore_all_xen #endif -END(entry_NMI) +END(handle_ist_exception) =20 FUNC(entry_MC) ENDBR64 --=20 2.30.2 From nobody Thu May 9 03:51:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1705947467; cv=none; d=zohomail.com; s=zohoarc; b=Oem60ZOwNoyvHWGMOJ9Kk34odFahttpDlPeloytWH/639flU/2vwZajVMMF10OJG9Heq4jA2hbODVKOuDMjhhjjYaFy7TGt2xwzwFigSt3cLPX1V8o8kGAyN2p5UWr+VTHoSsImpSHBje1y3LeipiG9nO9oEnReqrNnK3aiNk1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705947467; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KxdKqPnHNuCfnhtPhgsVTqfGCMCIGlyk9AdNwG0ac3g=; b=IwUWndaA8cZLWtgNYlA9uW0lpJ0au9rXitvGuCDQ4IOEeVqr6Rr34hpAJ+qy6pY3A0n161dVPxlgOSTj6pa7UNtY9DrPgdyLlKebrcWn+b3IuhrpmMN/aRSQ9PbooWvdIZkyuLym/egJjKlJud33meF+PR0zKVdUWrUm5LXmdRg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1705947467950266.967306365126; Mon, 22 Jan 2024 10:17:47 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.670056.1042672 (Exim 4.92) (envelope-from ) id 1rRyrV-0003Oa-Ko; Mon, 22 Jan 2024 18:17:33 +0000 Received: by outflank-mailman (output) from mailman id 670056.1042672; Mon, 22 Jan 2024 18:17:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrV-0003OR-Gg; Mon, 22 Jan 2024 18:17:33 +0000 Received: by outflank-mailman (input) for mailman id 670056; Mon, 22 Jan 2024 18:17:32 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrU-0002ee-8S for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 18:17:32 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 81d3cb62-b952-11ee-98f2-6d05b1d4d9a1; Mon, 22 Jan 2024 19:17:31 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 81d3cb62-b952-11ee-98f2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1705947451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OgCBjEopm2h8jWG+9/Xhya3FZKUqHbnhk17Gv+1BDRU=; b=c1wKeQr0dw9JcBsuuJitQK7MoW789dNY0Vpx5z6o+WOLN30l59ooqtOG v7OnkrLK3acuup3c+6QYUJ/YlTStHfAfuMpMbZmY6aGb4E7xzzQyBW2n9 SEa260pH5YIvtSNeu9SpsFLEM/WVJ0uPWOAl7QThfXX5rz0MdpGcspyiD U=; X-CSE-ConnectionGUID: FCbAE902SjqaC0PT4u4YkQ== X-CSE-MsgGUID: r6KQhKQYT5u7qdLl7+y8Yg== Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 132366785 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:BIBct6zPfBFey5hgD0d6t+dqxirEfRIJ4+MujC+fZmUNrF6WrkVRx jNJC2CEPK2OZzf3Ktl/aIm//UMO6pLSzoU3HQNsqSAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjPzOHvykTrecZkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8E4HUMja4mtC4gRnP6kT5zcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KU9l/ 9U1eWhXVRKajsnu+I7nV7Vdhf12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyPVKfO3WjOX9OYH46tM6uimPybHtzr1WNqLBsy2PS0BZwwP7mN9+9ltmiHJ4PxRjG+ TKbl4j/KgtEF+Wf6gO0zi+x2fbDuSekG5NCJbLto5aGh3XMnzdOWXX6T2CTsfS/z0KzRd9bA 0gV4TY167g/8lSxSdvwVAH+p2SL1jY+cddNF+wx6CmW17HZpQ2eAwAsUTppeNEg8sgsSlQC1 ViPhdrlQyNutL69TmiU/bOZ6zi1PEAowXQqPHFeC1Ffup+6/dB10Uqnostf/LCdoPb/MByhm 2qxrjE3rO0rsZIWi5S4xAWS696znaQlXjLZ9y2OATr4v1kpOtb4D7FE/2Q3+hqpEWp4crVil CJd8yRmxLpSZaxhbQTUKAn3IJmn5uyeLBrXikN1Ep8q+lyFoiH7INAOumsueh81Yq7onAMFh 2eK52tsCGJ7ZiP2PcebnarvYyjV8UQQPYu8Da2FBja/SpNwaBWG7ElTWKJk5Ei0yBJEufhma f+mnTOEUS5y5VJPkGDnGI/wENYDmkgD+I8kbcyjkkn6i+vPOhZ4i94taTOzUwzw14vcyC29z jqVH5LiJ8l3OAEmXhTqzA== IronPort-HdrOrdr: A9a23:TOX3b69/u1IOLTqRQnluk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re5cjztCWE7gr5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtBD4bbLbGSS4/yU3ODBKadD/OW6 X-Talos-CUID: =?us-ascii?q?9a23=3AcrUpZmuOJ0p6gWcPE3nt5PmK6IsLWXf04SaIeXS?= =?us-ascii?q?6EG9CEIWpFULMyaBdxp8=3D?= X-Talos-MUID: =?us-ascii?q?9a23=3AFj8AAw7ddN+7KNydiG8EQQVHxoxyvYeXCGM0oKl?= =?us-ascii?q?bppadOQh0ZHSM3AW4F9o=3D?= X-IronPort-AV: E=Sophos;i="6.05,211,1701147600"; d="scan'208";a="132366785" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [PATCH 2/3] x86/entry: Make #PF/NMI more amenable to livepatching Date: Mon, 22 Jan 2024 18:17:13 +0000 Message-ID: <20240122181714.1543738-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240122181714.1543738-1-andrew.cooper3@citrix.com> References: <20240122181714.1543738-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1705947470155100003 It is bad form to have inter-function fallthrough. It only functions right now because alignment padding bytes are NOPs. However, it also interferes with livepatching binary diffs, because the implicit grouping of the two functions isn't expressed in the ELF metadata. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Konrad Rzeszutek Wilk CC: Ross Lagerwall --- xen/arch/x86/x86_64/entry.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index c3f6b667a72a..fc64ef1fd460 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -723,7 +723,9 @@ END(common_interrupt) FUNC(entry_PF) ENDBR64 movl $X86_EXC_PF, 4(%rsp) + jmp handle_exception END(entry_PF) + /* No special register assumptions. */ FUNC(handle_exception, 0) ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP @@ -1023,6 +1025,7 @@ FUNC(entry_NMI) ENDBR64 pushq $0 movl $X86_EXC_NMI, 4(%rsp) + jmp handle_ist_exception END(entry_NMI) =20 FUNC(handle_ist_exception) --=20 2.30.2 From nobody Thu May 9 03:51:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1705947469; cv=none; d=zohomail.com; s=zohoarc; b=Dgcwx64iYPOOI0Du9AZURyc/QAza0XeQeRlJnH6jTs9OSxxoDSg0XAP6NWS9dgQb/ivgzYmZ/DNe820Ve85FjOPms+GtSzDYgMtql4rbhHRlhDDB7TwJn1CB/qlfx/xHquz+aSn9qxuv4LF9hx6Y10IOjKqImo8JXNUqhSYi+ds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705947469; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zAWVo9WPY0NQ4Y6PmPu4nHVLsYUnpjVGJghrnmES2e4=; b=Ax8WvG8gkGUBWOwGK6+vOMYMPDKrkrjdiXHLRiz9eeNKidjGIR6zwkpy+xeCe0DmbQhbu2L8+l3ml/Efyb1ZS6FcSQ3MHBV7QIQVel2Dh6secmXQqAIQFbwJB16y5VvfKljS44H7KULssLzaohbcdRo6khaBv87HuAfy+YXtYzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 170594746954885.64305202623734; Mon, 22 Jan 2024 10:17:49 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.670055.1042662 (Exim 4.92) (envelope-from ) id 1rRyrU-00039U-C9; Mon, 22 Jan 2024 18:17:32 +0000 Received: by outflank-mailman (output) from mailman id 670055.1042662; Mon, 22 Jan 2024 18:17:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrU-00039J-8w; Mon, 22 Jan 2024 18:17:32 +0000 Received: by outflank-mailman (input) for mailman id 670055; Mon, 22 Jan 2024 18:17:31 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrT-0002ee-8A for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 18:17:31 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 813a7f90-b952-11ee-98f2-6d05b1d4d9a1; Mon, 22 Jan 2024 19:17:30 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 813a7f90-b952-11ee-98f2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1705947450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6dfsqszFswrxwOrMixowdJmK44p//CqfM9fyArS7Qeg=; b=V5Bo5kjpOnlXaew3m8eYrh8fSkSvlZJvQuIwKGAl+9i4KNsMi88Mbbk8 tsviSbLUeULbEjUuidtfzf1zEV5h+iNQ0BMUl0DGLfQWCoNJzfQXfBV2o ELixMzpVikm4nMP9NpjSGzlc8Urdu1y7ZMVEMVuPtux8yxxip7mQ7ZaT6 4=; X-CSE-ConnectionGUID: FCbAE902SjqaC0PT4u4YkQ== X-CSE-MsgGUID: yXgy9DN9QV6oaaiQlBjpxA== Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 132366782 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:roncuaxofVltu9j6PzZ6t+dqxirEfRIJ4+MujC+fZmUNrF6WrkUGx mIdCjyGOqzZYWGmeoolbIqw9EJVuZTQytJkGwFlryAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjPzOHvykTrecZkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8E4HUMja4mtC4gRnP6kT5zcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KU9l/ 9U1eWhXVRKajsnu+I7nV7Vdhf12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyPVKfO3WjOX9OYH46tM6uimPybHtzr1WNqLBsy2PS0BZwwP7mN9+9ltmiHJ4PxRjG+ TKcl4j/KgAqO83O5RzUy0zygebGnBr/coAKBJTto5aGh3XMnzdOWXX6T2CTsfS/z0KzRd9bA 0gV4TY167g/8lSxSdvwVAH+p2SL1jY+cddNF+wx6CmW17HZpQ2eAwAsUTppeNEg8sgsSlQC1 ViPhdrlQyNutL69TmiU/bOZ6zi1PEAowXQqPHFeC1Ffup+6/dB10Uqnostf/LCdoPb/MByhm 2qxrjE3rO0rsZIWi5S4xAWS696znaQlXjLZ9y2OATr4v1kpOtb4D7FE/2Q3+hqpEWp4crVil CJd8yRmxLpSZaxhbQTUKAn3IJmn5uyeLBrXikN1Ep8q+lyFoiH7INAOumsueh81Yq7onAMFh 2eK52tsCGJ7ZiP2PcebnarvYyjV8UQQPYu8Da2FBja/SpNwaBWG7ElTWKJk5Ei0yBJEufhma f+mnTOEUS5y5VJPkGDnGI/wENYDmkgD+I8kbcyjkkn6i+vPOhZ4i94taTOzUwzw14vcyC29z jqVH5LiJ8l3OAEmXhTqzA== IronPort-HdrOrdr: A9a23:OHXhxq6D3PYljILgEQPXwPDXdLJyesId70hD6qhwISY6TiX+rb HWoB17726TtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QC5SWY+eQMbEVt6nHCXGDYrQd/OU= X-Talos-CUID: 9a23:wNHhH29hsSgmRGSfw4eVv2A/EOkIIyWH93XJKmTgMVo1VeGkSmbFrQ== X-Talos-MUID: 9a23:1G9CMgrjcy/NGp8hRlIezyBSO9Y5z4L/MX5TlpwPuvCAHy5oKx7I2Q== X-IronPort-AV: E=Sophos;i="6.05,211,1701147600"; d="scan'208";a="132366782" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [PATCH 2/3] x86/entry: Make #PF/NMI/INT0x82 more amenable to livepatching Date: Mon, 22 Jan 2024 18:17:12 +0000 Message-ID: <20240122181714.1543738-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240122181714.1543738-1-andrew.cooper3@citrix.com> References: <20240122181714.1543738-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1705947470094100001 It is bad form to have inter-function fallthrough. It only functions right now because alignment padding bytes are NOPs. However, it also interferes with livepatching binary diffs, because the implicit grouping of the two functions isn't expressed in the ELF metadata. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Konrad Rzeszutek Wilk CC: Ross Lagerwall --- xen/arch/x86/x86_64/compat/entry.S | 1 + xen/arch/x86/x86_64/entry.S | 3 +++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/x86/x86_64/compat/entry.S b/xen/arch/x86/x86_64/compa= t/entry.S index 49811a56e965..4fbd89cea1a9 100644 --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -29,6 +29,7 @@ FUNC(entry_int82) =20 mov %rsp, %rdi call do_entry_int82 + jmp compat_test_all_events END(entry_int82) =20 /* %rbx: struct vcpu */ diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index c3f6b667a72a..fc64ef1fd460 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -723,7 +723,9 @@ END(common_interrupt) FUNC(entry_PF) ENDBR64 movl $X86_EXC_PF, 4(%rsp) + jmp handle_exception END(entry_PF) + /* No special register assumptions. */ FUNC(handle_exception, 0) ALTERNATIVE "", clac, X86_FEATURE_XEN_SMAP @@ -1023,6 +1025,7 @@ FUNC(entry_NMI) ENDBR64 pushq $0 movl $X86_EXC_NMI, 4(%rsp) + jmp handle_ist_exception END(entry_NMI) =20 FUNC(handle_ist_exception) --=20 2.30.2 From nobody Thu May 9 03:51:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1705947477; cv=none; d=zohomail.com; s=zohoarc; b=gfsyKKGefkWZSRkr27bDmYAhCYw0SaFxyE+T6oXzp6/Ejzixw15+atJUdBxOMvcBtKtvtNTmoSemWi//o2yebkYtLPpvOduXrX9m0qAae8vZfyN+yR0DpJ/7MZXLy4djLyM6BsO0fZzKSv5EVU1WdWMAwwJKl3EBoKiJphLYiAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705947477; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nwWJro915dr2WOFMuDDtX+Pa17Na7VL8SeANkGqXNVY=; b=RHJzFRgfOhZQUH5pMTWYOIZ3F1mq2HSB8JgopZSFqWiru7RTPEqGuiFeUy1Vlu6eWn32PY/OrSTkQMEWYSdg7FUC3WzzIBXTm+nvf5n9YSgJfCZtg8CNo73ZxmjSuTk6lNeb7pC15S/1msHzgehGbESMXyEDPHZbLYy8YFwSeiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1705947477821471.22584180597937; Mon, 22 Jan 2024 10:17:57 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.670057.1042682 (Exim 4.92) (envelope-from ) id 1rRyrY-0003kf-Rj; Mon, 22 Jan 2024 18:17:36 +0000 Received: by outflank-mailman (output) from mailman id 670057.1042682; Mon, 22 Jan 2024 18:17:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrY-0003kQ-Nr; Mon, 22 Jan 2024 18:17:36 +0000 Received: by outflank-mailman (input) for mailman id 670057; Mon, 22 Jan 2024 18:17:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rRyrW-0003Bi-Rj for xen-devel@lists.xenproject.org; Mon, 22 Jan 2024 18:17:34 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 80b7c7d1-b952-11ee-9b0f-b553b5be7939; Mon, 22 Jan 2024 19:17:30 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 80b7c7d1-b952-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1705947450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PoQrTCXbOLESqrnXnnL2uPe7qZz7/Q2HWhe4ECuWOno=; b=QeIdA7wgpzUxQTTBPOvQYdMPnskButplDIWg8Q2WOQT/cr8PSl5yjWqZ 6IRwQ21/JfrjpepLTrw47XPZItGuN1U5sVDAD4Xgn5sgTfZgZLYd8RAGh lL5l76HoUF0tC95PMMXk0dxvku7K+pdSON1a9PEtB3AhgnBTrl9RS5/T1 Q=; X-CSE-ConnectionGUID: FCbAE902SjqaC0PT4u4YkQ== X-CSE-MsgGUID: 0jxmyDTtRTqlzcsjeZYdkw== Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 132366783 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:a45696nEah+gXt7H5Ld8+KDo5gzcJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJNXWjQaarbMWrzKdAjOY2xp0wCsZPTmIBhTgdu/yE9FyMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+e6UKicfHkpGWeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5KmaVA8w5ARkOagS5gaGzBH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 dIzIhkgP0jZvOCvyZnjctUwm5gSL/C+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dMlsQYj/7C7pn9AusrlD5fydVtxS+oq0v7nKI5AdwzKLsIJzefdniqcB9xx3C/ TyYoDSiav0cHISd2T+U3k6wvNPWmTHwQ4AfJoy09eE/1TV/wURMUUZLBDNXu8KRmkO4Ht5SN UEQ0i4vtrQpslymSMHnWB+1q2LCuQQTM/JyOeAn7ACGyoLP/h2UQGMDS1Zpd9gOpMIwAzsw2 TehnNTvHzVj9qKUTXG18a2dpje/fyMSKAc/iTQsFFVfpYO5+cdq00OJEY4L/LOJYsPdNxr66 h3b9HIFhawappYz6/mmoWHEumf5znTWdTLZ9jk7T0r8sVskNdT1OdT1gWU3+8qsO2pwc7Vgg JTns5LHhAz2JcvR/BFhuc1UdF1T296LMSfHnXlkFIQ7+jKm9haLJN8IvWEgfh05bJ5YKVcFh XM/XisIuvdu0IaCN/crM+pd9ex0pUQfKTgVfq+NNYcfCnSAXASG4DtvdSat4owZq2B1yftXE c7CIa6R4YMyVfwPIMyeG71MjtfGB0kWmQvueHwM50j/jOfDPi/EF9/o8jKmN4gE0U9Nmy2Nm /43CidA40w3vDHWCsUPzbMuEA== IronPort-HdrOrdr: A9a23:6GCv0ahsAl2TqCEToexWZ5ZtyXBQXuIji2hC6mlwRA09TySZ// rBoB19726MtN9xYgBHpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdWSS5vya3ODXKbkdKaG8gcKVuds= X-Talos-CUID: 9a23:ycT7bm8dkfWH7lol9hKVv2A/EOkIIyWH93XJKmTgMVo1VeGkSmbFrQ== X-Talos-MUID: 9a23:2NxdFgk/P7LI6LDiIXu/dno6Ntdt8oiSFHoxiJEUsNKGOB5BNzSC2WE= X-IronPort-AV: E=Sophos;i="6.05,211,1701147600"; d="scan'208";a="132366783" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [PATCH 3/3] x86/entry: Make intra-funciton symbols properly local Date: Mon, 22 Jan 2024 18:17:14 +0000 Message-ID: <20240122181714.1543738-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240122181714.1543738-1-andrew.cooper3@citrix.com> References: <20240122181714.1543738-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1705947478095100001 Each of these symbols are local to their main function. By not having them globally visible, livepatch's binary diffing logic can reason about the functions properly. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Konrad Rzeszutek Wilk CC: Ross Lagerwall sysenter_eflags_saved() is an open question. This does need to be globally visible, and I think any livepatch modifying sysenter_entry() will need a manual adjustment to do_debug() to update the reference there. --- xen/arch/x86/x86_64/compat/entry.S | 20 ++++++++++---------- xen/arch/x86/x86_64/entry.S | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/x86_64/compat/entry.S b/xen/arch/x86/x86_64/compa= t/entry.S index 4fbd89cea1a9..1e9e0455eaf3 100644 --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -41,7 +41,7 @@ FUNC(compat_test_all_events) shll $IRQSTAT_shift,%eax leaq irq_stat+IRQSTAT_softirq_pending(%rip),%rcx cmpl $0,(%rcx,%rax,1) - jne compat_process_softirqs + jne .L_compat_process_softirqs =20 /* Inject exception if pending. */ lea VCPU_trap_bounce(%rbx), %rdx @@ -49,11 +49,11 @@ FUNC(compat_test_all_events) jnz .Lcompat_process_trapbounce =20 cmpb $0, VCPU_mce_pending(%rbx) - jne compat_process_mce + jne .L_compat_process_mce .Lcompat_test_guest_nmi: cmpb $0, VCPU_nmi_pending(%rbx) - jne compat_process_nmi -compat_test_guest_events: + jne .L_compat_process_nmi +.L_compat_test_guest_events: movq VCPU_vcpu_info(%rbx),%rax movzwl COMPAT_VCPUINFO_upcall_pending(%rax),%eax decl %eax @@ -71,7 +71,7 @@ compat_test_guest_events: jmp compat_test_all_events =20 /* %rbx: struct vcpu */ -LABEL_LOCAL(compat_process_softirqs) +LABEL_LOCAL(.L_compat_process_softirqs) sti call do_softirq jmp compat_test_all_events @@ -84,7 +84,7 @@ LABEL_LOCAL(.Lcompat_process_trapbounce) jmp compat_test_all_events =20 /* %rbx: struct vcpu */ -LABEL_LOCAL(compat_process_mce) +LABEL_LOCAL(.L_compat_process_mce) testb $1 << VCPU_TRAP_MCE,VCPU_async_exception_mask(%rbx) jnz .Lcompat_test_guest_nmi sti @@ -96,12 +96,12 @@ LABEL_LOCAL(compat_process_mce) movb %dl,VCPU_mce_old_mask(%rbx) # iret hypercall orl $1 << VCPU_TRAP_MCE,%edx movb %dl,VCPU_async_exception_mask(%rbx) - jmp compat_process_trap + jmp .L_compat_process_trap =20 /* %rbx: struct vcpu */ -LABEL_LOCAL(compat_process_nmi) +LABEL_LOCAL(.L_compat_process_nmi) testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) - jnz compat_test_guest_events + jnz .L_compat_test_guest_events sti movb $0, VCPU_nmi_pending(%rbx) call set_guest_nmi_trapbounce @@ -112,7 +112,7 @@ LABEL_LOCAL(compat_process_nmi) orl $1 << VCPU_TRAP_NMI,%edx movb %dl,VCPU_async_exception_mask(%rbx) /* FALLTHROUGH */ -compat_process_trap: +.L_compat_process_trap: leaq VCPU_trap_bounce(%rbx),%rdx call compat_create_bounce_frame jmp compat_test_all_events diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index fc64ef1fd460..130462ba0e1a 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -188,7 +188,7 @@ FUNC_LOCAL(restore_all_guest) =20 RESTORE_ALL testw $TRAP_syscall,4(%rsp) - jz iret_exit_to_guest + jz .L_iret_exit_to_guest =20 movq 24(%rsp),%r11 # RFLAGS andq $~(X86_EFLAGS_IOPL | X86_EFLAGS_VM), %r11 @@ -220,7 +220,7 @@ FUNC_LOCAL(restore_all_guest) LABEL_LOCAL(.Lrestore_rcx_iret_exit_to_guest) movq 8(%rsp), %rcx # RIP /* No special register assumptions. */ -iret_exit_to_guest: +.L_iret_exit_to_guest: andl $~(X86_EFLAGS_IOPL | X86_EFLAGS_VM), 24(%rsp) orl $X86_EFLAGS_IF,24(%rsp) addq $8,%rsp @@ -432,10 +432,10 @@ UNLIKELY_END(msi_check) cmove %rdi, %rdx =20 test %rdx, %rdx - jz int80_slow_path + jz .L_int80_slow_path #else test %rdi, %rdi - jz int80_slow_path + jz .L_int80_slow_path #endif =20 /* Construct trap_bounce from trap_ctxt[0x80]. */ @@ -457,7 +457,7 @@ UNLIKELY_END(msi_check) call create_bounce_frame jmp test_all_events =20 -int80_slow_path: +.L_int80_slow_path: /*=20 * Setup entry vector and error code as if this was a GPF caused b= y an * IDT entry with DPL=3D=3D0. @@ -472,7 +472,7 @@ int80_slow_path: * need to set up %r14 here, while %r15 is required to still be ze= ro. */ GET_STACK_END(14) - jmp handle_exception_saved + jmp .L_handle_exception_saved END(entry_int80) =20 /* create_bounce_frame & helpers don't need to be in .text.entry */ @@ -750,10 +750,10 @@ FUNC(handle_exception, 0) cmovnz %r12d, %r13d .Lxcpt_cr3_okay: =20 -handle_exception_saved: +.L_handle_exception_saved: GET_CURRENT(bx) testb $X86_EFLAGS_IF>>8,UREGS_eflags+1(%rsp) - jz exception_with_ints_disabled + jz .L_exception_with_ints_disabled =20 #if defined(CONFIG_PV32) ALTERNATIVE_2 "jmp .Lcr4_pv32_done", \ @@ -859,9 +859,9 @@ handle_exception_saved: #endif =20 /* No special register assumptions. */ -exception_with_ints_disabled: +.L_exception_with_ints_disabled: testb $3,UREGS_cs(%rsp) # interrupts disabled outside Xen? - jnz FATAL_exception_with_ints_disabled + jnz .L_FATAL_exception_with_ints_disabled movq %rsp,%rdi call search_pre_exception_table testq %rax,%rax # no fixup code for faulting EIP? @@ -891,7 +891,7 @@ exception_with_ints_disabled: jmp restore_all_xen # return to fixup code =20 /* No special register assumptions. */ -FATAL_exception_with_ints_disabled: +.L_FATAL_exception_with_ints_disabled: xorl %esi,%esi movq %rsp,%rdi tailcall fatal_trap --=20 2.30.2