[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/shadow: don't use #if in unlikely() invocation


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 26 Feb 2026 10:04:13 +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=7Nur07DrxjgT6QdN0xBW6YHYrP4RJX3ZYILLg/TEeCM=; b=GBNrnwDPMB5/Un0AoNpl2qA01hiZtcq6odlzmHkRW89Wj4nThrX5fqbElXqOr4ay2zWvryEp6hKTlsmGU9Kt0bKWQ7e6in5N1W4OmviigCDTRRgeN53ixYw3WVShAr0ET+rQSIKQOvSCYG+vsUQXe5X9AFtqynrTFJ5wzIM4k8sc62YV187cNBNlaeCY9jCCaAFT8FYJ5GHMYHmwnzRak8W9dsNb71bvymv3u+GxGkqkgEmlPEKLuLWXAcSALmKu8E2wbbdCP5CF0KAR8t6ZcrWU9ICDMZmNsI2dK6HHQlReLlYzBY6GfR6LJOPEMGUOu5r4vupfMxNeo+hFYOLFcQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Hi3O9KgSErvlxmQlLGz/F+BGFY5fIdtb6SPsAZTzkch8xPhvJOdIa4/LtvAUMbwDsaqymLf+Rc7FS+oXO6MV4HPsO9UsFost122/pJm3JsuM88fuFe1NeRcGd9tismlUfhy4Wuy43fX2avpqVEhmAjlBg05yLasamJxNhp94WWZ91Fqvg6ydWAYtKgNxMWoulSLgwrN7KzaFoKt3DGUqYEjUJltqtEwjqkNqxo/wCxxlv8uWmjxhYmVCiEDWxm1WN8a1IWZKfbRsa8hUJgi6XLF8UqgJ+IGLzn9A0hKx+HA1lcUSCHj5m6b3KDueRNfDDO/l1Q40taxS37rpmWiHTg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 26 Feb 2026 10:04:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/02/2026 8:57 am, Jan Beulich wrote:
> As per the standard this is UB, i.e. we're building on an extension in
> the compilers we use (for gcc, see "The C Preprocessor" section
> "Directives Within Macro Arguments"). Misra C:2012 rule 20.6 disallows
> this altogether, though.
>
> Combine the fix with some tidying: Fold the two level-1 checks, adjust in
> particular comment style, and move the unlikely() use to a single inner
> part of the conditional.
>
> No functional change intended.
>
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.