[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 04/12] x86/shadow: use lighter weight mode checks
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 20 Feb 2026 14:55:55 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CUKhE00XX/d9JUrWrno4QrWyT4FPTR/ihK0BclffFuw=; b=yWyAxKWKxGgiXwgRTGZcaWDqTIqIJMPgc4siMtBpRkGcGMRBLI4570uIl1ZpsCC3U/M7ZzJdosNqSf/yLjKzgLBnlsBEeUcJ/1Sb6OZFCh18TWC93r6I4RQYwZs7m0L+TixWEi/EXTVURCrYQRWofryGv30MHqykw4e0H6+h9J0CW9zxG5vUZc7Dy1RopPqnPoKz8zPQmCnwY0JV9OkqvjUVjDlRKJeoHg00zvzmgVuEgN1tZdQ6Xo1ghd3GggUXy4eEnd3gxVNluIrrqWKjtzGF3EOxkXmlkQqDdRJNEornYpC4FG3RpHUzKOb9UMgi4I1bIQzJFuuSFerh4Tdz7w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aVhyCkfK/Zqb3FeJ0D//IdSMJ7uNebuR9MYbELrhFOwRKZxASeo8fz+vfof561vRjGblvAEBWb7E2rpfytVomoT8qwRBxwbV/fQsdKutsGbNrKlOvpr2XtXdqvNAyXH/bm2B9AxqzapQqajKvneQ+pYQKXBEFoYokBqsOdtQznQ+FJHyn2zDXQ1CfFe98yOheEhvOEyVcbeyZdzmv1gPCb8dP71Cru1aEKvvvgh4zZAStdRfoh37f3QLKRgfTKkJzbwCNyF7ukxCfwGdfqFLBd60LbwtBNcCABszdAXuYHnKAePXXewMI/GgcchzHJ5lQiu1Z+Oue+VBnoqGO77S0g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
- Delivery-date: Fri, 20 Feb 2026 14:56:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16/05/2023 8:39 am, Jan Beulich wrote:
> shadow_mode_...(), with the exception of shadow_mode_enabled(), are
> shorthands for shadow_mode_enabled() && paging_mode_...(). While
> potentially useful outside of shadow-internal functions, when we already
> know that we're dealing with a domain in shadow mode, the "paging"
> checks are sufficient and cheaper. While the "shadow" ones commonly
> translate to a MOV/AND/CMP/Jcc sequence, the "paging" ones typically
> resolve to just TEST+Jcc.
That's because shadow_*() are checking a minimum of 2 bits, while most
of the paging_*() ones are only checking a single bit.
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|