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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BA92C433FE for ; Mon, 18 Oct 2021 18:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5445C61212 for ; Mon, 18 Oct 2021 18:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232536AbhJRSbb (ORCPT ); Mon, 18 Oct 2021 14:31:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30949 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbhJRSb2 (ORCPT ); Mon, 18 Oct 2021 14:31:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634581757; 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=+zrJzRq36uZrK1pQoD4cVchCz3CVWNsoHXcKclsvSjE=; b=Lbw9f1E0GpfUKbsvYq+QGLeWydsaSH1YhK9/rDdkGXJqcmlEBpMASzcuS946G0eS6oIzcD 2+8069uH+BFy93kHCPzfRnfo500bxwNZwWQLX5w/coOE1t7NkYNUF/4zVYxumXl31vqqu4 Kknhi8ue1tzCZ53nru8+Kxr1x+q3djw= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-442-JFQo3CzRPxO8-u4INloEzA-1; Mon, 18 Oct 2021 14:29:15 -0400 X-MC-Unique: JFQo3CzRPxO8-u4INloEzA-1 Received: by mail-ed1-f69.google.com with SMTP id c30-20020a50f61e000000b003daf3955d5aso15205210edn.4 for ; Mon, 18 Oct 2021 11:29:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=+zrJzRq36uZrK1pQoD4cVchCz3CVWNsoHXcKclsvSjE=; b=H/Gl73aooTW2oDa4nTXY5uJkcHf1lHwe44Q0Fzuf75L49nsxyn9918rI1uQqNyd+Me gvZu0+kXq+Mjrqau7zE4x/Hvp2MMpl3Ya6sJTByyya8pcnLwWh7YjwFCiXWjU36Wg92x 5FsA5irCGBkIPB95mDjF93GPZN8rw4KFPFQmEDj8vheBVq5lcXzkNjWW0f6hmgJud50c 3cLg7AcAnvjFR+oKxK7ifEppcVsVIU60KViOV/ARfNkNbL7DcbZxJ+LuCjGoe6jPndnj hnO3hRZXsPTPiiY9GJQgnQ81XisbaBUbW5g5SAeJ0iBlo2a12rz5Y1v+cbqT/itfvd2s e+IQ== X-Gm-Message-State: AOAM532FlUUKRcUx2N/JWg9XdnoBlMSG7fTlwfXkdUAqcCwEAidofcGK cPgdLU00ysfXgkJtsNgFFXr0bOd2EdGrxNcQPywZKf1kOpupWeWq3gNYFVg7Sq0CaYDsIfQA3Wt WuYwKx9wr0kvY/cNN/EjcU57M X-Received: by 2002:aa7:cb10:: with SMTP id s16mr49380886edt.311.1634581754592; Mon, 18 Oct 2021 11:29:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/L8ULpPs3NPQuxX00gJmUT3pfBNY82BNyjykCPa2tBJ4Vti+M0Cbd2x62rSJlw3P2Odb9eA== X-Received: by 2002:aa7:cb10:: with SMTP id s16mr49380870edt.311.1634581754432; Mon, 18 Oct 2021 11:29:14 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id a13sm9116280ejx.39.2021.10.18.11.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Oct 2021 11:29:13 -0700 (PDT) Message-ID: <93d4156f-4d81-da15-b93e-79f3ec9bebdb@redhat.com> Date: Mon, 18 Oct 2021 20:29:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [GIT PULL] KVM fixes for Linux 5.15-rc7 Content-Language: en-US To: Linus Torvalds Cc: Jim Mattson , Nathan Chancellor , Nick Desaulniers , Linux Kernel Mailing List , KVM list References: <20211018174137.579907-1-pbonzini@redhat.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/10/21 20:15, Linus Torvalds wrote: >> * 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). > That makes very little sense. > > It seems to be avoiding a 'jcc' and replace it with a 'setcc' and an > 'or'. Which is likely both bigger and slower. The compiler knows that the setcc is unnecessary, because a!=0|b!=0 is the same as (a|b)!=0. > If the jcc were unpredictable, maybe that would be one thing. But at > least from a quick look, that doesn't even seem likely > > The other use of that function has a "WARN_ONCE()" on it, so > presumably it normally doesn't ever trigger either of the boolean > conditions. Yes, and that was why it used a "|". Anyway, not worth arguing for or against; I'll just change it to logical OR. Paolo