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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2B85C433F5 for ; Mon, 16 May 2022 14:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244300AbiEPOIS (ORCPT ); Mon, 16 May 2022 10:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233260AbiEPOIO (ORCPT ); Mon, 16 May 2022 10:08:14 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C5FF3A72E for ; Mon, 16 May 2022 07:08:13 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id q76so14170538pgq.10 for ; Mon, 16 May 2022 07:08:13 -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=u8W+9QrHPo7jdPM3Bcoe/9qQ4ATKCLa3Udps7+UVOAc=; b=a70vIt1fKElhDJvP1TFnRL5oukRLPASFThfAiiD0oSs+ftrcbRS+O6yQGBEhqMGLHW PM76KWpc8psDzV3PWj71Mu6MevW3FA4KEc1uqRGDYHY8Ij5oAtIrBCTyI3x9c4rfC/f+ JdGhUpGE8JewAOEa23SbWg1suSLR6pgMqpT+YNk2e/XTWmUIPYJhcOuUaETTIcIw6soH pykKXejyUAgE9mbYBrYKY/5GZ94m7Ddj+AueGghoQ5jWv5nOz92UPBQLWFI0aONjbrom G+oLCsjyZ2RbZCLv6T0TobHjIZ/m6tyKAIZ7Q1LcX4O1wO+eiZCJSs4BXyeCD/X4zukB 5UIQ== 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=u8W+9QrHPo7jdPM3Bcoe/9qQ4ATKCLa3Udps7+UVOAc=; b=worzxNGuMFHp6GByOOA/71VgqKdHMn/6KlM6XSjp5alSaYf7Ft2AvpYXJ6m66iza0x INaNyTfMHwfVVXpbTJdxOOUXrr0Fzoibv6zzAPAEURgYZdBWoTAtdquxrlz+o4PQzTmG Ny7ZitvqO5I6oo97iugQwSlKK2p/mtNjOncyV7GxBh6kHaH1uXxPH4mMd5ibvDM7owiM EaaB/oH2wpcPioaQwSmE6a/xP9osXzjI2Xvxdg8qBgiTUCrNWaZCHyaD6RMJ5bRiYNHi iQn7WQB+H0hDIOHLKyhGQLsvO/56PDDrZAksvv/7FK+GA0Ux0CwoHsfDI2Z+n9tzlP5w U69g== X-Gm-Message-State: AOAM533mr5klSXlYQkqWhIKi9clXtG0SZTCyFKzbqZDcpQWIfiowWobv ni/p59Czoq2dFKay7GVUYFGQDg== X-Google-Smtp-Source: ABdhPJz5NgVVTf7vK89fkPbIuFUxS+rfyRPXvX7qLlLWuEUustncEiJv134yGfkqbAZ1P1ORH7HSyg== X-Received: by 2002:a63:1d42:0:b0:3ed:6b3d:c52d with SMTP id d2-20020a631d42000000b003ed6b3dc52dmr10639644pgm.295.1652710092327; Mon, 16 May 2022 07:08:12 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id c1-20020a170902c2c100b0015e8d4eb2e9sm6999368pla.307.2022.05.16.07.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 07:08:11 -0700 (PDT) Date: Mon, 16 May 2022 14:08:08 +0000 From: Sean Christopherson To: Maxim Levitsky Cc: Uros Bizjak , 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 16, 2022, Maxim Levitsky wrote: > On Wed, 2022-05-11 at 21:54 +0200, Uros Bizjak wrote: > > On Wed, May 11, 2022 at 6:04 PM Sean Christopherson wrote: > > > 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. > > > > Yes, the idea was to improve cmpxchg64 with the implementation of > > try_cmpxchg64 for 64bit targets. However, the issue with 32bit targets > > stood in the way, so the effort with 32-bit implementation was mainly > > to unblock progression for 64-bit targets. > > Would that allow tdp mmu to work on 32 bit? >From a purely technical perspective, there's nothing that prevents enabling the TDP MMU on 32-bit kernels. The TDP MMU is 64-bit only to simplify the implementation and to reduce the maintenance and validation costs.