Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp77372rwb; Mon, 26 Sep 2022 15:04:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM44bQIF3Yk3evVssR/ZT2QgPaZPV45Jem2uQq5ciIii/KKW/Ta2iHvS0BB+fKSnz0hZ52Kp X-Received: by 2002:a65:6e47:0:b0:438:c2f0:c0eb with SMTP id be7-20020a656e47000000b00438c2f0c0ebmr21842721pgb.236.1664229843846; Mon, 26 Sep 2022 15:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664229843; cv=none; d=google.com; s=arc-20160816; b=RPasy0yANWEVVLvhSD4argYJ4CKA+xXAai1JZQvCfZDh4DitaBBDaeDhc+tc/ZkKEz yJIYo7hcRtIJhrnROkNIHxJ9YNDkB4rJw55HHFdsx74TCp09YPVKytEgTBobv6wHlQwR WRxZvGJKDxd9Jf1uhV6Hw05ymTqOzLPr7Ujnz4HGyds1RgkQh81p8e4l3wlYn6fSUXOV IdhGAHd8yqKllM/3yMZde0IsRX3Iopeus9SBp5vfEyvN7PV6yGcRbf2L5bsRXu4EpI73 tMAohOsCnq0tab9fVvfRv0yDOetwWOztuLV11XGdex2QOQDYO0D3NvfD7qB8rSEAxXs3 o0ng== 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=BSxwN1blbO9o4mvvlVqSk+QYYJi/P+H+Gku7okdIw6w=; b=KkdoL23KRtiay2Sb3vi5LKDWgaKlibN82mAmrvoOyX9kY4p1pCVBhQ6A3k+ASBQiHv Axs1irnEOokCQegXGghIP0o7d1lIjVs/Ouc2sGTuHFQhTin/owJDiy7FcnUDCaBUgiXb LadMeUgWUMaQgGJqcjr9/KUkiMIYFl+plBlVwaZ63DKkMPCiBACjH9iynvkijdzjwZ1B aQIttxVIT59bcglgRPRlqSoIAkipFDlYAlu7TyWt3XS19L75amvsY9y3KJBf+SasaWhF 6bfqCCz9Jlk2jp3RAXqlOdcg4ry0BQNMooS8WYDhRKMd0LpbuhQruNZK4yU9fVO8k/5f CWRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oaiJ7Nux; 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 pf1-20020a17090b1d8100b001fdcb564d7fsi13606671pjb.158.2022.09.26.15.03.51; Mon, 26 Sep 2022 15:04:03 -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=oaiJ7Nux; 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 S229890AbiIZV2q (ORCPT + 99 others); Mon, 26 Sep 2022 17:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbiIZV2n (ORCPT ); Mon, 26 Sep 2022 17:28:43 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E82DA261B for ; Mon, 26 Sep 2022 14:28:42 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so8279051pjl.0 for ; Mon, 26 Sep 2022 14:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=BSxwN1blbO9o4mvvlVqSk+QYYJi/P+H+Gku7okdIw6w=; b=oaiJ7NuxPxGbqm96aXsHRKz8mmI5aVzOWF52Lk+sYBMF1vQTjYGzPYC/Syo7aVaKsP tBc9PDB1wev9DSE95fHpNcRmKnX1bUCR9+qasbTyo8uFfy/rVBDrYGlTRsI4J7/73fID C47bD1+Gy94sDGiocZXnqmPbEfPSVoom3tWEGO1HnUFwnPWK6wxO1JokLHHtVhKUeRya gaLXpXOdKezvzq0VnV8w+alHU78xBA3Z2PmJo4RpSM7j87KROqyKY5x9jCXDDd0Rsb1f Xao7EUKLGoxfX2S6A85ZNKFea3Gkh0UZbTeONNnU/+hU/8VB4R0Jb7DL4OpDWMl0bN0u 0T1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=BSxwN1blbO9o4mvvlVqSk+QYYJi/P+H+Gku7okdIw6w=; b=zs0CMIpXwvoHdtBZvcMtNtZCNrGJq5iIkk1LqcsTCfi635wbBKD051NNs57G3YNvrv cS8Hoeefpp74GxtBYwVTmd/py44Il6855mpwu8oDFXo9OPKOcXSLFL37xB6L+C5aErSn jPzKIQGT0qEZvRDtE8O+oGRGfcgCLMfUY/eHaSir0FBevAGWxrXSnJ9E9lUx5u6NBdL5 4XvlJ31+EMWOBfar9N2TNA9ckPqvlw3yT8goK+G8RYKEJ2jvhkOAuPWtgROVaVypymZM Di1eJmIUq1WT7UPc0hjNBdsuB7fHT6f9fyJ31ga+6pYqsQWVtoqRgy7799E+eQH94Wdo bMlw== X-Gm-Message-State: ACrzQf2aADuF4HypWnmE2QgqG8LV8jd/k5Y/ASdAhBItbThcGvaOaMp9 7Uf+xCdiXgqYuO90i9k0eLv81w== X-Received: by 2002:a17:90a:c711:b0:202:5cda:765c with SMTP id o17-20020a17090ac71100b002025cda765cmr800921pjt.35.1664227721973; Mon, 26 Sep 2022 14:28:41 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id k11-20020aa7998b000000b00537d60286c9sm12707916pfh.113.2022.09.26.14.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 14:28:41 -0700 (PDT) Date: Mon, 26 Sep 2022 21:28:38 +0000 From: Sean Christopherson To: David Hildenbrand Cc: Emanuele Giuseppe Esposito , Paolo Bonzini , Maxim Levitsky , kvm@vger.kernel.org, Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Like Xu Subject: Re: [RFC PATCH 0/9] kvm: implement atomic memslot updates Message-ID: References: <20220909104506.738478-1-eesposit@redhat.com> <5f0345d2-d4d1-f4fe-86ba-6e22561cb6bd@redhat.com> <37b3162e-7b3a-919f-80e2-f96eca7d4b4c@redhat.com> <55d7f0bd-ace1-506b-ea5b-105a86290114@redhat.com> <111a46c1-7082-62e3-4f3a-860a95cd560a@redhat.com> <14d5b8f2-7cb6-ce24-c7a7-32aa9117c953@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14d5b8f2-7cb6-ce24-c7a7-32aa9117c953@redhat.com> 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, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Mon, Sep 26, 2022, David Hildenbrand wrote: > On 23.09.22 15:38, Emanuele Giuseppe Esposito wrote: > > > > > > Am 23/09/2022 um 15:21 schrieb David Hildenbrand: > > > On 23.09.22 15:10, Emanuele Giuseppe Esposito wrote: > > > > > > > > > > > > Am 19/09/2022 um 19:30 schrieb David Hildenbrand: > > > > > On 19.09.22 09:53, David Hildenbrand wrote: > > > > > > On 18.09.22 18:13, Emanuele Giuseppe Esposito wrote: > > > > > > > > > > > > > > > > > > > > > Am 09/09/2022 um 16:30 schrieb Sean Christopherson: > > > > > > > > On Fri, Sep 09, 2022, Emanuele Giuseppe Esposito wrote: > > > > > > > > > KVM is currently capable of receiving a single memslot update > > > > > > > > > through > > > > > > > > > the KVM_SET_USER_MEMORY_REGION ioctl. > > > > > > > > > The problem arises when we want to atomically perform multiple > > > > > > > > > updates, > > > > > > > > > so that readers of memslot active list avoid seeing incomplete > > > > > > > > > states. > > > > > > > > > > > > > > > > > > For example, in RHBZ > > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1979276 ... > As Sean said "This is an awful lot of a complexity to take on for something > that appears to be solvable in userspace." And if the userspace solution is unpalatable for whatever reason, I'd like to understand exactly what KVM behavior is problematic for userspace. E.g. the above RHBZ bug should no longer be an issue as the buggy commit has since been reverted. If the issue is KVM doing something nonsensical on a code fetch to MMIO, then I'd much rather fix _that_ bug and improve KVM's user exit ABI to let userspace handle the race _if_ userspace chooses not to pause vCPUs.