Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp502275pxb; Fri, 15 Oct 2021 09:50:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwciVYhkR+GbyPLGdnNBzQBOXfdB9cR6yypK+JoP6CS2wRtWZpqwigxQd00eyVzAtv+kljc X-Received: by 2002:a17:906:94da:: with SMTP id d26mr8323195ejy.213.1634316611550; Fri, 15 Oct 2021 09:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634316611; cv=none; d=google.com; s=arc-20160816; b=D8GEC5hFQNX07MJyY9WdcZFRzYcm11nIWsmWL/8iPSUwijY+otBu6g5dMAukLN9o5j 4AEPmpFIsmMwW0KWfVUk1eY0jv/VgtIfFCwwl6I4vF86vzCGuw/I1XlPQatasg/npYdl 7SRlPjsOe5/5UPfK77BOg7pf01DF5hxcUrZbDA9Ejn/y9WXdUmP5ApuGDxceAI8a4r22 qa6N5VD9ctDB1h5L6fS98sbvtU+dqazkja2wakpcgwbkUiBznm2cI/XbqA353JNe8LM2 Q6UnaLXKyz5jDKgrSGT/uH+Ha9ioSdauHjWDJO15HJtLYNmjL5/6Mgm8ecOavcCwiyZy 2JHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=1KdI1b95Ma9fj82jtMmONBjcr0AQBV2wvVKzB96XPbs=; b=A7cHlWtNA8ahTwU/3bxl00X8ahJXxSgNDjCCCLgE6Z6zx0YIQ0+xFm/GWXKqaAJsSV Du5AtDz3yPjY+b/thTUcxqokmLz/OYxb0/5EwmIB3KDSTYXYGk4VKenSaiPr0qI6OIKG Udy6kC6MCtMji2l0x8k1G3L+wF1nwObZzdZBz3jZ1akuDhsxyEPV3RMSino+6sqE1Uur U4mYvT4N5cF14bSk/wiQYD5ZMe9qAC26OugATvtw8ysirrl2UQESz4WMonlYFJ9ZODuQ m0Agqa34ZcfB3zgXAYGrh9W89Cvh5i1wyWz02yx8XrH1aag0/BeX0O3d7GkyigqYuVI9 N5Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PsFCgDe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si8983782eju.458.2021.10.15.09.49.47; Fri, 15 Oct 2021 09:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PsFCgDe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237089AbhJOJTf (ORCPT + 99 others); Fri, 15 Oct 2021 05:19:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23151 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235937AbhJOJTe (ORCPT ); Fri, 15 Oct 2021 05:19:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634289448; h=from:from: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=1KdI1b95Ma9fj82jtMmONBjcr0AQBV2wvVKzB96XPbs=; b=PsFCgDe5pmbb1YgrnLQWWvP5Uko7z0mIlLoOF7O9RUOmOU+EtPCPilwkYC6+ndIMU2ZZuN rGg6l9xC3QCZxSIVmPFI5zEUwQunhAHf0OJdBUZ0Ae6x4AUjyPB5ocECJ7R2RA/shbpCCJ XYI69WLQ76Y8OsPdMPgSf9HhemJsf8U= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50-vRhSAf23MFmg3xIvS89DNA-1; Fri, 15 Oct 2021 05:17:26 -0400 X-MC-Unique: vRhSAf23MFmg3xIvS89DNA-1 Received: by mail-wm1-f72.google.com with SMTP id p3-20020a05600c204300b0030daa138dfeso460729wmg.9 for ; Fri, 15 Oct 2021 02:17:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1KdI1b95Ma9fj82jtMmONBjcr0AQBV2wvVKzB96XPbs=; b=rkXjq+Ys6HmRX5ve6l5hITb9D6ndIiuOoxaHVFtR+bul/Bh76+jeq606/HoKYEzXAw GURrWxYuanbbUNMMMA3iphB1NMM55g6BpnPXJFf5c81bzeySfGgW/1oB67HJIGuxE2Vs 2u7IrNfQFdN/z1DHzpN4ySSu0C7Wy54cq5os8FZ/qG0S/0DtmF9RjaInWPLZeK1+JVD+ G3dM++jvfyFbw0VGZ2pwP2yosP0ExsKJfUC3S5vliWvXJ7qfGZpgV2Nkg/D5vq1ySCC/ NIBvWNI1NnWqdVWBtrNOLlEo+rTJls/wDBAANd7HYto9fvCzs+vuBjfMkPQcw1mBc+dW XItw== X-Gm-Message-State: AOAM531HkHl1Y7gCobwMJS2AggeYL0yEb2/rX4h2Mlx+zYS8V8kPzHKk BOvVNo5uBqVSf23xySfKS94Hx51cB6AOX+gBV9KGKoc9o318LdvoXbtJ1v9w/F+HsxwNEDhowSz wPbpl9bXY0oVVdadVrqqIpYEm X-Received: by 2002:a7b:c386:: with SMTP id s6mr25302238wmj.183.1634289444897; Fri, 15 Oct 2021 02:17:24 -0700 (PDT) X-Received: by 2002:a7b:c386:: with SMTP id s6mr25302215wmj.183.1634289444691; Fri, 15 Oct 2021 02:17:24 -0700 (PDT) Received: from smtpclient.apple ([2a01:e0a:466:71c0:b1f7:fa09:b694:af37]) by smtp.gmail.com with ESMTPSA id n12sm4593102wms.27.2021.10.15.02.17.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Oct 2021 02:17:23 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [BUG] [5.15] Compilation error in arch/x86/kvm/mmu/spte.h with clang-14 From: Christophe de Dinechin In-Reply-To: Date: Fri, 15 Oct 2021 11:17:22 +0200 Cc: Nick Desaulniers , Sean Christopherson , Nathan Chancellor , Jim Mattson , torvic9@mailbox.org, "vkuznets@redhat.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "bp@alien8.de" Content-Transfer-Encoding: quoted-printable Message-Id: <9F0C48F4-A62B-456C-9EBD-DB02026631D1@redhat.com> References: <1446878298.170497.1633338512925@office.mailbox.org> <936688112.157288.1633339838738@office.mailbox.org> To: Paolo Bonzini X-Mailer: Apple Mail (2.3654.120.0.1.13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 14 Oct 2021, at 22:50, Paolo Bonzini wrote: >=20 > On 14/10/21 21:06, Nick Desaulniers wrote: >>> If we want to fix this, my vote is for casting to an int and = updating the comment >> At the least, I think bitwise operations should only be performed on >> unsigned types. >=20 > This is not a bitwise operation, it's a non-short-circuiting boolean = operation. I'll apply Jim's suggestion. What about making it an inline function, which would require evaluation = of arguments: static __always_inline bool BITWISE_BOOLEAN_OR(bool a, bool b) { return a || b; // Safe here, because arguments have been = evaluated } Suggesting that because I'm always nervous about casts in macros hiding = something that the type system would otherwise catch. Christophe >=20 > Paolo >=20