Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp388658iob; Wed, 11 May 2022 17:13:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWISlXqDT5BkNrPc0SFZA1ykjC0xVdsP5XesMAywdA4cCxDACzyeNDajniXQBgt77GvkkA X-Received: by 2002:a17:906:2310:b0:6f3:dad4:e285 with SMTP id l16-20020a170906231000b006f3dad4e285mr26878181eja.9.1652314424852; Wed, 11 May 2022 17:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652314424; cv=none; d=google.com; s=arc-20160816; b=iBZuAKIodDqDqXXUrap44drojyvSL425Lefik6O/oPgSTDLGhWh/2uQ1PS0kD/VDg4 FJfJneBnkVZHjSFiRWsF/qPB9y7Ux+89TQ5w5nJ17NjnzlAjtIf1fZitT3S4LRm4/vTw iDY+GRjHHex9mWvh8Q5yNCcne9v0IyFwSFpNXJBWYIXv3sYO4+WXBPSzXXineM9Ms2cj IC56lgcarrCVRbyn7VWfEAXVXqVgLoCFggEuOIynIW51+0oH0d+RxdfwW9cqa6+41F5f riptVH2WkrA8eDJg67GBT84huo3qs7fCCYovPFyNlWTm2+EEQxnTSu64yirjby19YHSK ILtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TRKmAr5NAdQKEYAx0dVLgEebSdJiqCRTYjBrDYpiOp0=; b=iGgIO05MOLs+V8KK1V4jAZLTug1UbMTWgWWq3rLLyqk9BIFL6aIy4f5d6OTBRB/42g x+OyODiqHQ889x3NRrTSNvqqkRJY6TNv4mMht3fljXYW9wUoIp7eSqeKFKZRQrOZ4w/z F6Re4TEtS83uowp8wFZnZ+GRRXxpwwE9LdDw94kvLaj67RWc2ANHrXPS3b4lPkiQ70T6 ucipQsZP9lw+RI4ZrmSAhb5NPaMxHGEOWz9TCpMU087L4rR/OGxOPZdrqoR4Ny7J8Ak7 +x3fDFxwOdC0RYhooodSAcEcQa+R1dYeXcQzAHzEGWbV8KiKUIZzeV0GIazwe6rJdBZd k/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qC7AesSw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz12-20020a170906f2cc00b006df9153e00bsi4131602ejb.10.2022.05.11.17.13.14; Wed, 11 May 2022 17:13:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qC7AesSw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344293AbiEKQFK (ORCPT + 99 others); Wed, 11 May 2022 12:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344370AbiEKQEz (ORCPT ); Wed, 11 May 2022 12:04:55 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021121D3D4C for ; Wed, 11 May 2022 09:04:51 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d22so2304023plr.9 for ; Wed, 11 May 2022 09:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TRKmAr5NAdQKEYAx0dVLgEebSdJiqCRTYjBrDYpiOp0=; b=qC7AesSwyMDnyGl33oJbOlVtzDDtrNyv/UI9YPmCNFCb32MV8ZWDQZuurnWgehEVKQ pAJnAKGfgm5aJWrYYA98SQ4SfRf9cl7yY9zD8XSDe5z/1FIS3Jr9abC4tLZ6HSV6uUGU g/Z4eLQnc8NDYkRWUOSKnl/StkCs8VDm87+thHuE34uRCjxYdcgNSSf5oBQh0jri+1YA gsU65s4kn6qbOGKB6D7VXGlbuJkbDB8IwT5W4XOgFhrEAQEdVKrZ0kCwQq9U7PNKW8Rc rW3wLcjptzHpgJfSU9l0ScBmNKKn3JQ7KXpFE0CyWdnDszsC2buG9tzEvAopnrddQrAN Iyjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TRKmAr5NAdQKEYAx0dVLgEebSdJiqCRTYjBrDYpiOp0=; b=ENChMtvTNoi3w5BE4audHE8R4ixXO1Qz/IpLBICrLoId2hz9w3u5qEbyhGMVTFV0s/ C9K5k6CcnY6x9QzV52RAlVYElPmhVLzlu8qkeMuVQorgWlv2bC8x2TY8cyN/xVDFoj+5 s5bHyRbNAqREzxzPCHtkw7hd+O6Xjca0ECQsC152JX91nPRo168xBRNUXv2rbZkuJAJF PhiBorLEUG8qDr1YbVSp4QG6WTR5CrJcX4GGdda42lpBiYFv84l3sVSUPs8VtKgEqeea D1WpoR/F1IDqO1YiniMlvJHqinyDEXXhjf7BHQ+YQAPDT4/s0qwyfuXKvbnh8xaXnV11 kRkQ== X-Gm-Message-State: AOAM530tw9t15scpM4Ir9EvwkmGiLvjUNYBcQgr90AR/47HAB2YQoKEZ 7KRHwjZgtU9gXaHygw2/R31j7Q== X-Received: by 2002:a17:90a:bc8a:b0:1db:382d:6fb5 with SMTP id x10-20020a17090abc8a00b001db382d6fb5mr6112062pjr.100.1652285091145; Wed, 11 May 2022 09:04:51 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id z12-20020a170902708c00b0015e8d4eb1desm2063112plk.40.2022.05.11.09.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 09:04:50 -0700 (PDT) Date: Wed, 11 May 2022 16:04:47 +0000 From: Sean Christopherson To: Uros Bizjak Cc: Peter Zijlstra , X86 ML , LKML , kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Will Deacon , Boqun Feng , Mark Rutland , "Paul E. McKenney" , Marco Elver Subject: Re: [PATCH] locking/atomic/x86: Introduce try_cmpxchg64 Message-ID: References: <20220510154217.5216-1-ubizjak@gmail.com> <20220510165506.GP76023@worktop.programming.kicks-ass.net> <20220511075409.GX76023@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022, Uros Bizjak wrote: > On Wed, May 11, 2022 at 9:54 AM Peter Zijlstra wrote: > > Still, does 32bit actually support that stuff? > > Unfortunately, it does: > > kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \ > vmx/evmcs.o vmx/nested.o vmx/posted_intr.o > > And when existing cmpxchg64 is substituted with cmpxchg, the > compilation dies for 32bits with: ... > > Anyway, your patch looks about right, but I find it *really* hard to > > care about 32bit code these days. > > Thanks, this is also my sentiment, but I hope the patch will enable > better code and perhaps ease similar situation I have had elsewhere. IMO, if we merge this it should be solely on the benefits to 64-bit code. Yes, KVM still supports 32-bit kernels, but I'm fairly certain the only people that run 32-bit KVM are KVM developers. 32-bit KVM has been completely broken for multiple releases at least once, maybe twice, and no one ever complained. 32-bit KVM is mostly useful for testing the mess that is nested NPT; an L1 hypervsior can use 32-bit paging for NPT, so KVM needs to at least make sure it doesn't blow up if such a hypervisor is encountered. But in terms of the performance of 32-bit KVM, I doubt there is a person in the world that cares.