From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82CD1C35E0E for ; Tue, 25 Feb 2020 21:22:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C89B20714 for ; Tue, 25 Feb 2020 21:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728969AbgBYVWo (ORCPT ); Tue, 25 Feb 2020 16:22:44 -0500 Received: from mga06.intel.com ([134.134.136.31]:46361 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbgBYVWn (ORCPT ); Tue, 25 Feb 2020 16:22:43 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 13:22:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,485,1574150400"; d="scan'208";a="231158820" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by orsmga008.jf.intel.com with ESMTP; 25 Feb 2020 13:22:42 -0800 Date: Tue, 25 Feb 2020 13:22:42 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 43/61] KVM: x86: Use KVM cpu caps to mark CR4.LA57 as not-reserved Message-ID: <20200225212242.GJ9245@linux.intel.com> References: <20200201185218.24473-1-sean.j.christopherson@intel.com> <20200201185218.24473-44-sean.j.christopherson@intel.com> <8736azocyp.fsf@vitty.brq.redhat.com> <66467dd7-09f0-7975-5c4e-c0404d779d8d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66467dd7-09f0-7975-5c4e-c0404d779d8d@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 04:12:28PM +0100, Paolo Bonzini wrote: > On 24/02/20 23:08, Vitaly Kuznetsov wrote: > >> + > >> +static __always_inline bool kvm_cpu_cap_has(unsigned x86_feature) > >> +{ > >> + return kvm_cpu_cap_get(x86_feature); > >> +} > > I know this works (and I even checked C99 to make sure that it works not > > by accident) but I have to admit that explicit '!!' conversion to bool > > always makes me feel safer :-) > > Same here, I don't really like the automagic bool behavior... Sounds like I need to add '!!'?