Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B908CC48BC3 for ; Wed, 14 Feb 2024 15:08:30 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.680954.1059375 (Exim 4.92) (envelope-from ) id 1raGrz-0000m9-74; Wed, 14 Feb 2024 15:08:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 680954.1059375; Wed, 14 Feb 2024 15:08:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1raGrz-0000m2-3d; Wed, 14 Feb 2024 15:08:19 +0000 Received: by outflank-mailman (input) for mailman id 680954; Wed, 14 Feb 2024 15:08:17 +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 1raGrx-0000ls-ED for xen-devel@lists.xenproject.org; Wed, 14 Feb 2024 15:08:17 +0000 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [2a00:1450:4864:20::235]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e09a6d5b-cb4a-11ee-98f5-efadbce2ee36; Wed, 14 Feb 2024 16:08:15 +0100 (CET) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d107900457so27149241fa.1 for ; Wed, 14 Feb 2024 07:08:15 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id m22-20020a7bcb96000000b0040fafd84095sm2130736wmi.41.2024.02.14.07.08.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Feb 2024 07:08:13 -0800 (PST) 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: e09a6d5b-cb4a-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1707923295; x=1708528095; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IPp1XQ7LPeZ5bV2atiaBj+y5LoeQvJFr62RZlyniSWY=; b=Kk0br5/V8uNO7+CUoUll7GQQ174rpKfQDcneqVI1GOrbpvVbFvJVznDSCaD4j8HwAO xk33Wf1j+D4bAYoyXqqLYhv2YvDHooBqx1s+oL+Y8kns2+eeAW67PDH9rfHzostGai6m P0yqpDUc78nMD0pW17w7G3BPe7b9YPX0PwUEGnBppBLyypYAl9o7IB97ECq7TgHRUduM Isn3jtMLSvjWrSkXFAVm4oLy0n3Ylxs1/F19pTrwm8b8Kmo1oISe1XO52vTAZsQE/NgW 20a1fgNqT5HSAYVM8zstinZNgDIQnx1y93I6285iX1lA2MoObndDbcorFzkQxjVf8klq Oskg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707923295; x=1708528095; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IPp1XQ7LPeZ5bV2atiaBj+y5LoeQvJFr62RZlyniSWY=; b=ly1xLtU1CTZpkoLNi2jgLxzfwwIDGuFkGiEyNhUhyQxgSIsiuzUbVOOGlQP5CuP80u 233A11wRdoj5MxSyPk87bCkqp7G/SeihsjJGAQqxw+Nt8gVyEHH9uzGBgJiYEZR0mpbp G/uG8YRrvvcXpfjwhcC6+vBUm7Cu7THufKtruFC8qf6RCUIAM02vSiDpaEanTpKhhTXK fUU05qSURn2LsqsdMxQ4PUsKJ5vVPrWUr42qWCh5j4WnzUkFqelLgnHKuPfzHwGHySMg MmL8LA7mOJKlO/YDk2bw9FX+4dse40pi/6c9tD/DAfVNeO6XmUSd+4MoVeHBi0KZpoe0 gm/w== X-Gm-Message-State: AOJu0YyWXv72IHXTfHz9wok1K0yM+usL67KMH4T8ue2EKjyivCiDFGt0 p/MhET4gWDpmOt3rzFXycBbQkECOS1QpUX/g7MsH3EqhS3AEFf3XZGaWEuwGpQ== X-Google-Smtp-Source: AGHT+IFkQd8efQKrrrO0G5mJ5ipb1YMZqMoY4w2jgGgWks+8Vbfs9ELcrurcGm2884ewN5XzOcli2w== X-Received: by 2002:a05:651c:198a:b0:2d1:1d89:347a with SMTP id bx10-20020a05651c198a00b002d11d89347amr1266023ljb.17.1707923294717; Wed, 14 Feb 2024 07:08:14 -0800 (PST) Message-ID: Date: Wed, 14 Feb 2024 16:08:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Reduce assembly code size of exception entry points Content-Language: en-US To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: xen-devel@lists.xenproject.org, Andrew Cooper , Wei Liu , Frediano Ziglio References: <20240214103558.13655-1-frediano.ziglio@cloud.com> From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBt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MpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 14.02.2024 16:02, Roger Pau Monné wrote: > On Wed, Feb 14, 2024 at 10:35:58AM +0000, Frediano Ziglio wrote: >> We just pushed a 8-bytes zero and exception constants are >> small so we can just write a single byte saving 3 bytes for >> instruction. >> With ENDBR64 this reduces the size of many entry points from 32 to >> 16 bytes (due to alignment). >> Similar code is already used in autogen_stubs. > > Will using movb instead of movl have any performance impact? I don't > think we should trade speed for code size, so this needs to be > mentioned in the commit message. That's really what the last sentence is about (it could have been said more explicitly though): If doing so on interrupt paths is fine, it ought to be fine on exception paths as well. Plus, no matter what, we have two overlapping stores in every one of these places. But yes, their sizes may still be relevant to the overall result. Jan