[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6abc5a3-39ea-b463-9df5-f50bdcb16d08@redhat.com>
Date: Mon, 4 Oct 2021 11:26:08 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: torvic9@...lbox.org, "seanjc@...gle.com" <seanjc@...gle.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"bp@...en8.de" <bp@...en8.de>
Subject: Re: [BUG] [5.15] Compilation error in arch/x86/kvm/mmu/spte.h with
clang-14
On 04/10/21 11:08, torvic9@...lbox.org wrote:
> I encounter the following issue when compiling 5.15-rc4 with clang-14:
>
> In file included from arch/x86/kvm/mmu/mmu.c:27:
> arch/x86/kvm/mmu/spte.h:318:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
> return __is_bad_mt_xwr(rsvd_check, spte) |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ||
> arch/x86/kvm/mmu/spte.h:318:9: note: cast one or both operands to int to silence this warning
The warning is wrong, as mentioned in the line right above:
/*
* Use a bitwise-OR instead of a logical-OR to aggregate the reserved
* bits and EPT's invalid memtype/XWR checks to avoid an extra Jcc
* (this is extremely unlikely to be short-circuited as true).
*/
Paolo
Powered by blists - more mailing lists