Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3056221iob; Mon, 16 May 2022 12:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfhjn33qumIWHmN6vN0QFjmWOEOoDbeFTbs+lPo5ktUdhzxGROAZoTz1oxy89o3ttdHS+Q X-Received: by 2002:a17:902:cf05:b0:156:9d:ca01 with SMTP id i5-20020a170902cf0500b00156009dca01mr18379799plg.111.1652727983207; Mon, 16 May 2022 12:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652727983; cv=none; d=google.com; s=arc-20160816; b=QXqgvr4ksrQddfbOlSKnhYI5sVltXVe44/Dq5cxVC3WR1g1gk9YlYN2rRg3rO/hDlG PK00Kn8dy47rcsSxiEa7+Pn0Tyvm+lxQOq5vNeXwp8pMNz6t4V1j43gG+Fslf1EiBIgL YlDtC3s3BdeNcR8hwELNuRTVLJIHSj5esU1jBhk5tR01ENx07BsjGP+BTlxHTQ/MYVZ0 NRvjM9hJNBbNKzGv6Qp9MnYYrSoYXSxKitfnzEpNiMOJaaFAtnsrUWvIcF0eyHrEmPAs yDMrhtHXzpPCoA6eCgRCJ6KvfGQ2XoS+V9FZ4DWRehI9bl4jYPZX9dw6N7OO8HuT4PrZ jEcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=msH0fbWMB2FjlFoGW4LyhQTRlos1WPFFFL4WveZKmPQ=; b=DNqK4fVfzxl0ho/Nb86Un6WYQMV5vOxm7RySAOuNmtDYnoE6lkOKpveIXjSiwqBkgc 9Z36Shj1E3FmICqEAFIedlxwaSOjdEz9STrq37MoFZdF8zpBZpYXZJ/6HCxNP9uEeIkC jHRo1pwgKbWCa/qVLePqzAAsYk0kxIDoYF2MA/37PnB4E+jK33tc/bzWnrA5T0DwmStw 9O0wF22nnC6vCDp6PUT6CluskFYz2MeIgjc8pKznQDeMBqOwYtiLnZ+Tt8bTMyP0AGFq aR47Y3ouvIS9IPpt/UDqZ1E1e56Jq25sOYnjW0NF1SV5h3mpkMeKB1WCKx6aaST0Y+nQ RJfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aYXlTqPG; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a16-20020a63d410000000b003db4fc881c5si12393404pgh.771.2022.05.16.12.06.09; Mon, 16 May 2022 12:06:23 -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=@redhat.com header.s=mimecast20190719 header.b=aYXlTqPG; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244188AbiEPOET (ORCPT + 99 others); Mon, 16 May 2022 10:04:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbiEPOEO (ORCPT ); Mon, 16 May 2022 10:04:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C55E3915C for ; Mon, 16 May 2022 07:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652709852; 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=msH0fbWMB2FjlFoGW4LyhQTRlos1WPFFFL4WveZKmPQ=; b=aYXlTqPGIpl234AUF1g65d6s6Pugpk5Gbpooh+QCp9EsB+gXNFEzrE3OKM8emI8797/oEJ 1D4FkyPAGuQVDqBhvQQeBCgblNk0l9NoUqWTF28ZcqnSWEecj2nQVLAQjdOJTjlc1qpWVX pXiREfQV+75u3fZxKS2VPfBQSTQR01M= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-558-HFWdWCckNxiAyEOTdL7HQw-1; Mon, 16 May 2022 10:04:09 -0400 X-MC-Unique: HFWdWCckNxiAyEOTdL7HQw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4037D89B841; Mon, 16 May 2022 14:04:08 +0000 (UTC) Received: from starship (unknown [10.40.192.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC86D2026D64; Mon, 16 May 2022 14:04:04 +0000 (UTC) Message-ID: Subject: Re: [PATCH] locking/atomic/x86: Introduce try_cmpxchg64 From: Maxim Levitsky To: Uros Bizjak , Sean Christopherson 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 Date: Mon, 16 May 2022 17:04:03 +0300 In-Reply-To: References: <20220510154217.5216-1-ubizjak@gmail.com> <20220510165506.GP76023@worktop.programming.kicks-ass.net> <20220511075409.GX76023@worktop.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 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? Best regards, Maxim Levitsky > > Uros. >