Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp234650rdb; Mon, 18 Sep 2023 13:25:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFim8mgJrecZvUBtHBX+suFQZK80O8Y0324GGXoZTlHM+Z0h59+c/hyqQ79Bbc5pOrryrTk X-Received: by 2002:a9d:7a92:0:b0:6bc:bc3e:f40b with SMTP id l18-20020a9d7a92000000b006bcbc3ef40bmr10986413otn.19.1695068737435; Mon, 18 Sep 2023 13:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695068737; cv=none; d=google.com; s=arc-20160816; b=0uAlPK9CoKjtaRkH6oSGtGn2BiD9V6hKT8yh5156RRUjGZr/jefRKBbRqF4LayXnTi it2Nsi3trf2drU36NBD3dhrcJLeDwvvuLCCJMQRoqaISx9TycKM177RUgMc4vJqQQRN6 Bz3iQ7yj8szm3r2LbXPJsnog6f6OPqlPwGZB3OPrvD/PeXGX7tc2Lo5r613+LswHuH5P yE737LBn9HfWW7IKmYDauXdNboG3U2xr2K4uthL3WAlamGU9Ud0VbMQgmEZOTErppITS x/XI84eZheevLUPJPKL3JYe9JOVXKr7j4nckrADzAO63/TSro85bKef8vaHt9+8GTL3s qihg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=s17YssV/eLMk3v6BQw21PztJLVQ1uDSUDnGyHA0nJic=; fh=3pYsw8iNZ4x7kDLFpA3j9F09TxC/WyOUd8LO/OKGIzI=; b=MJrsyRiFMwdVIbEN0BYMNFXIMqoagrti0F09UtED6VLyAjt4nDgjM4wMEH88dlsTQU oLktl3dFALGfeEmG3pFmzUV4Ugk/IgIeiZBrh3LHi0kwVL175qxXJCrc4F3DejqDYfcz 9ivZ/Mnv3WHhuKvnj2ovjf0oOZwt+Oe3uwg0/sxPCGK68Z7B4Uh05vBtV06ERG+xubzF 5rUxdnzTqi7Qj+iTuOzGeu3SDir1VFAPgBtv87rVS4OUtbWaHKOsM1/jBOVzolgfGIAw 2lIL7g0LDXSLg1zHbNMT+Bst2LvQNLL1gsoasTZZnlKXjUqlETm86jC1hTa0ghaGfCjq e6SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=29mFCgzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x24-20020a631718000000b0057751b7788esi8445500pgl.488.2023.09.18.13.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 13:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=29mFCgzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 8F8218098B97; Mon, 18 Sep 2023 09:04:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjIRQDz (ORCPT + 99 others); Mon, 18 Sep 2023 12:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjIRQDw (ORCPT ); Mon, 18 Sep 2023 12:03:52 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B55C49C9 for ; Mon, 18 Sep 2023 09:01:51 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-59b59e1ac70so58939667b3.1 for ; Mon, 18 Sep 2023 09:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695052667; x=1695657467; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=s17YssV/eLMk3v6BQw21PztJLVQ1uDSUDnGyHA0nJic=; b=29mFCgzEaKXgI7BJZgdelVVGImtdHCE2jfWHG7m0Kw0Ihmz69s1VSQ4NvYUCM6MJol A9yr4B7MUuqqWO9htV1FHHai+1Wf6SeDdosUaIQhlIdAVUWgadhsgqOCJHybVx08RyUf j0KXbhEe6dYJ9g7Sh2neYuUkRUevWzwLdDSU8u6cCI4tPtvcvBprx15w0BN8eTfqO7kl 6Dgqn4BODRv4r+XzJjGkwpkVWEUz3GbSoYbMgBJhlqUoasBORVmSAQFFSiGpTtJQrEOl YwQpxNh3jBhjxcv5+WtUiau53mI8EgAEEqSkeKzyPNuAqZ4PkfjAnfhBVK+JuhypuyiU CN4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695052667; x=1695657467; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s17YssV/eLMk3v6BQw21PztJLVQ1uDSUDnGyHA0nJic=; b=oGXQnSjbeoYsw4gKNSIz17/jEDQf8EOb+lRDc3gZONH3H4q4U69SOWfrK1ERowrPe8 OLvHosf7kfOuSy5zIorSWlzAwQrmqDPpZMjyY5n/pJKCffy3PIdq+EbM2oXFmpUbSEaH ygG7xzJK0UDuSJPMDFyUWuPhmkuW2EES4IDbS8G7401xMqdu+3evxbIWWNGCE78cp2ig Oug6PontzBVYLuZvbP8vGhPLonLrv4ujeTmnjeaZ7gNwrU2HAQ/bl7bto0wYfZgYOeuB IgdJUowOewF0hhuGtwesQNQu8iEK729vfCojianRXVeD7fJz8HNbzYzx+5xp+Mih+AZF Opvw== X-Gm-Message-State: AOJu0YxPruMG1KkbxlPuz9doGLV5ZtNVYHjMAut+FtNE6OmUgs18BILN 3Jy7fdqJgkaR2B5cxiOx7KkDL1O2SaY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:4cf:b0:d7f:f3e:74ab with SMTP id v15-20020a05690204cf00b00d7f0f3e74abmr227961ybs.1.1695052667494; Mon, 18 Sep 2023 08:57:47 -0700 (PDT) Date: Mon, 18 Sep 2023 08:57:45 -0700 In-Reply-To: <9925e01b-7fa9-95e4-dc21-1d760ef9cde4@linux.intel.com> Mime-Version: 1.0 References: <20230914015531.1419405-1-seanjc@google.com> <20230914015531.1419405-11-seanjc@google.com> <9925e01b-7fa9-95e4-dc21-1d760ef9cde4@linux.intel.com> Message-ID: Subject: Re: [RFC PATCH v12 10/33] KVM: Set the stage for handling only shared mappings in mmu_notifier events From: Sean Christopherson To: Binbin Wu Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" , Chao Peng , Fuad Tabba , Jarkko Sakkinen , Anish Moorthy , Yu Zhang , Isaku Yamahata , Xu Yilun , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 18 Sep 2023 09:04:06 -0700 (PDT) On Mon, Sep 18, 2023, Binbin Wu wrote: > > > On 9/14/2023 9:55 AM, Sean Christopherson wrote: > > Add flags to "struct kvm_gfn_range" to let notifier events target only > > shared and only private mappings, and write up the existing mmu_notifier > > events to be shared-only (private memory is never associated with a > > userspace virtual address, i.e. can't be reached via mmu_notifiers). > > > > Add two flags so that KVM can handle the three possibilities (shared, > > private, and shared+private) without needing something like a tri-state > > enum. > > How to understand the word "stage" in short log? Sorry, it's an idiom[*] that essentially means "to prepare for". I'll rephrase the shortlog to be more straightforward (I have a bad habit of using idioms). [*] https://dictionary.cambridge.org/us/dictionary/english/set-the-stage-for