From patchwork Mon Nov 13 11:52:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 164440 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1146824vqg; Mon, 13 Nov 2023 03:53:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbrgZzEIIfSjHk94Ke/pBgK6qfoclj4vIbu2mJVdW1AfDnGTpwKItLZD9m7U9bOSbL5aEG X-Received: by 2002:a17:902:f54e:b0:1cc:43ca:b5b3 with SMTP id h14-20020a170902f54e00b001cc43cab5b3mr7298379plf.28.1699876394193; Mon, 13 Nov 2023 03:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699876394; cv=none; d=google.com; s=arc-20160816; b=QRSw+ze+HA7pJe0YjfgbRTraLo7vJ6DUQyaoHFSZiaznZ7nDP/vTtNaCfMqDBHygay SiAG46w+PLp+kEzGW9Wzfo4xAKbO2WQ4/YlR+ayD+EBZYboZzkVj3lSM8jBke/4PCdcT MnYmTZj/7fBZOgz6I/xAguMuggrIwW3v0EUpnJ0iWkgAo3OJKWgqlHKqPzJBO5VOpeP6 bBw5yunhqXfPu1bkZX/EwlYPDe1sbSZ+dg//2hiuPZz1nSYTMeS/Li8lTzbdS3mvqGfK v4DMmBqsmDFul500PNHOdknaxP/L21gmTvEdMIbzvINV3dzxzgSoM6UYiSRIvfTUkQFQ qiGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=4msdHeUrgp8KzqkFUcrYp4Qn6D29uyYMmeGXoVJhZ8E=; fh=gTGlZoh3jxCukkhQajgzjZFvTygrYF3gKFKTLkGq8eE=; b=I0DL5bj0+KCeKFa6dQaDeo79nNCL7h4LGBfW59fj3TRpa9IhFSVf6ufoht1XKiSpwK XTyNo7W4agXApF+1Dy5gO55TBVFU+akVKPG0MWGj5PgatNYKxYcAifG9rp2np8O0K0Eh W9tFGFsHeJIQIjPnYOxYWIbC2dDnEwgqagD+oMXZvCAWC/NbVxrVTsYhM8GjZz/jGcTX zXFSC494+hWqRRu7rg9FF4nVyqTrjUC4GTQGdBaU40ULKqnTk/wGFcYrv29eoWYQGTsG syUHv7qGnjU/15iugfockjU20eSFXtWa4hYApqw+QvaKIUVFC2GWGXTdbz5e4Ws8bAIm IxuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QsQNgugc; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q3-20020a17090311c300b001c9e29d5d8asi5773116plh.112.2023.11.13.03.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:53:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QsQNgugc; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 36D2080859B9; Mon, 13 Nov 2023 03:53:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbjKMLwv (ORCPT + 29 others); Mon, 13 Nov 2023 06:52:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbjKMLwt (ORCPT ); Mon, 13 Nov 2023 06:52:49 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1AEFD6C; Mon, 13 Nov 2023 03:52:46 -0800 (PST) Date: Mon, 13 Nov 2023 11:52:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1699876364; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4msdHeUrgp8KzqkFUcrYp4Qn6D29uyYMmeGXoVJhZ8E=; b=QsQNgugc6AbepcIt/bYWV77VtqROUFuwsFhE064sCM6Ctjrh48zFsvPI5fZ4HtaLgjTfn5 dCvOwTH91LU1AdNyY7jMCC4LKeHbKacx8ioYN1cYy4Umg2abBBDzdLDX6lpzQnSiylSQWx gTbe/6HtuYIKCCLyPEfUjlLK/erv8Es5SC39cHzC7CaKeJLcH+8s6x39xNEHVid+8tnQUl 85KkdMoWey/LGh9NC1ir4nQT5QWFDEOi4ehiXST2T35uOUIu6EPIzkHhxXghPTB8x348KI Ocq5ozfLZmqQknDB0A39fx+pzlbgKRmvXoIgreoB2WKOObzZga/wg1ztlsuzlA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1699876364; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4msdHeUrgp8KzqkFUcrYp4Qn6D29uyYMmeGXoVJhZ8E=; b=5Mx3JLOod7/OuHUsnlZ45Mjwcg+q1SRkV8dL8KMXKZkSpYE5WUTk8xJfGKj2HMlDu3z9wr tS+N8ZGWfKXEUmDw== From: "tip-bot2 for Hou Wenlong" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/paravirt] x86/paravirt: Make the struct paravirt_patch_site packed Cc: Nadav Amit , Hou Wenlong , "Borislav Petkov (AMD)" , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3C6dcb20159ded36586c5f7f2ae159e4e030256627=2E1686301?= =?utf-8?q?237=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= References: =?utf-8?q?=3C6dcb20159ded36586c5f7f2ae159e4e030256627=2E16863012?= =?utf-8?q?37=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <169987636342.3135.13474563880935419815.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 13 Nov 2023 03:53:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1768221078413979001 X-GMAIL-MSGID: 1782449590080645198 The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: fe22bc430c9d24394e541e16e0941a075f02fcb7 Gitweb: https://git.kernel.org/tip/fe22bc430c9d24394e541e16e0941a075f02fcb7 Author: Hou Wenlong AuthorDate: Fri, 09 Jun 2023 17:45:32 +08:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 13 Nov 2023 12:43:50 +01:00 x86/paravirt: Make the struct paravirt_patch_site packed Similar to struct alt_instr, make the struct paravirt_patch_site packed and get rid of all the .align directives and save 2 bytes for one PARA_SITE entry on X86_64. [ bp: Massage commit message. ] Suggested-by: Nadav Amit Signed-off-by: Hou Wenlong Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/6dcb20159ded36586c5f7f2ae159e4e030256627.1686301237.git.houwenlong.hwl@antgroup.com --- arch/x86/include/asm/paravirt.h | 2 -- arch/x86/include/asm/paravirt_types.h | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index d9384e9..693c61d 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -748,11 +748,9 @@ void native_pv_lock_init(void) __init; ops; \ 772:; \ .pushsection .parainstructions,"a"; \ - .align 4; \ .long 771b-.; \ .byte ptype; \ .byte 772b-771b; \ - .align 4; \ .popsection diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index e1bfb71..f4fb2e3 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -8,7 +8,7 @@ struct paravirt_patch_site { s32 instr_offset; /* original instructions */ u8 type; /* type of this instruction */ u8 len; /* length of original instruction */ -}; +} __packed; #endif #ifdef CONFIG_PARAVIRT @@ -263,11 +263,9 @@ extern struct paravirt_patch_template pv_ops; #define _paravirt_alt(insn_string, type) \ "771:\n\t" insn_string "\n" "772:\n" \ ".pushsection .parainstructions,\"a\"\n" \ - " .align 4\n" \ " .long 771b-.\n" \ " .byte " type "\n" \ " .byte 772b-771b\n" \ - " .align 4\n" \ ".popsection\n" /* Generate patchable code, with the default asm parameters. */