From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Christopherson Date: Mon, 18 Sep 2023 08:57:45 -0700 Subject: [RFC PATCH v12 10/33] KVM: Set the stage for handling only shared mappings in mmu_notifier events In-Reply-To: <9925e01b-7fa9-95e4-dc21-1d760ef9cde4@linux.intel.com> References: <20230914015531.1419405-1-seanjc@google.com> <20230914015531.1419405-11-seanjc@google.com> <9925e01b-7fa9-95e4-dc21-1d760ef9cde4@linux.intel.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D84D63CC for ; Mon, 18 Sep 2023 15:57:48 +0000 (UTC) Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-d81486a0382so4854692276.0 for ; Mon, 18 Sep 2023 08:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695052667; x=1695657467; darn=lists.linux.dev; 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=o0IENACE1jMyAufmCVKBiAEdbDmM1r4DviWVQu4Eu6bkFp9TYvkMjgk9wNkS0CaPp3 rWaXGi2S4TpPg1L7Xb5q0JMSGgbKNc6t3z0q7eWPoVz7/sjwv6ZLmjLfIaj4yUfkF5wB Ev7rnHwPyv9K8MSgjMB/CRZuGJiJXyfLp5O53CIr2HTa6JQ3kHEJaK+YlQH8ahuECzRW oHyrrIyxPa5IQTpKuXkoiDamm+WXePmlzT8NM0zeawetJsFROAKxjp0mDBrEMUXNlGxX gJ+TzCbNcDdPkaS8Gs5nV5KNALHTe1BH3O3zsVtigD8yySVHg8zpph6j+od8j7BcWiqY V2Fw== 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=VlNhOe8FhwxfKH4fXET2otuDSKSavm8HrUQ0It8ltP3PunmevUXsA4E3ztJXBqBznp +ohYsga+BI4GG490MKKxcyOGpMhJ2P7gH7L/pR1AfhyZfMg4PveVCGhYi/QcTWSYZjw1 3wMFiqpW4QLGWuPTgVASQNOtGBQ6InpUJDlaUWePGR685q7kIr2UyVV9HmNGcymM46xs XEpLXPutoDexqJ+7S8T59dPA92Eq15ARfaXBhHEv6wVZ+/6cf7+pXh+BVybplVpuKJ7V OcTdyAxpmd3wyx6Mnkyd0CEkFTszcEJ5t6XakT8hWKxhubyPr+HvyNDtQd22cLCx1JvY SoWw== X-Gm-Message-State: AOJu0Yw5iFjVQspxkuth9O+4LDS5btBpnYWTLUoZ+lHHwAeNON8JwdIJ xZTNaAxRc5QRfn5itpSw/bzkyr0Am8s= X-Google-Smtp-Source: AGHT+IFqXVMaW5EWUR3sn7RRHAULv1S9Ax+JzluU+Y462jgw29bgpZAEkbL739S68Hx7QOlYkiFqSLcGAUw= 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> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 808B4CD13D8 for ; Mon, 18 Sep 2023 17:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fyqTnSvLrEpRhuIb43o1a32Hfjgp5ItyGWpTPz2zLeE=; b=fLAiuC0R6DBgpunGuBLB3DqAc7 ro6WOqZ7dYnMfph3BIBADA2auYCAmRHB6H16PAxH6BtYAqk+04WzHlBG5nQPd5t3b4GGlCYU16h8U UnHe5+QPve+RKalbC0s27sRk8CrfRvdlmwpcclzBHjWTC3aqwNdlYeUd6phIYhtYU85otKrvQsUrM WqhovqGLb2fdLLu35522pHXql/R2EatXlFKubfnMneQoTF3YMtEpuunlC149B3l+b9fgNCfYDNIC/ nanawHjE3XWz6ZNcZzO2PYzjCdYyFumXbzI6z2Gjz/egxo6s+MiOcZGM143zjTuIM7CyBWBzWHxLU uD73KYRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiHbd-00FvU1-0i; Mon, 18 Sep 2023 17:00:17 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiGdJ-00Fo37-02 for linux-riscv@bombadil.infradead.org; Mon, 18 Sep 2023 15:57:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=s17YssV/eLMk3v6BQw21PztJLVQ1uDSUDnGyHA0nJic=; b=IqI8XhH3QP8EptBttPqrWkQRIp TEuSCNVBqwtIwGnCTe86hc6W7v4lN4x+cVdy2m7dIvaWjOtwTZZ1wTacmRuPq0676D4u0B8QQNbu7 7WUz+9ATC5yBM76f3BXjWbYB+v+wVwGDs6w7ogXSdvUJaZvkC9mevXnluY3A8N0Iailgq7hgJAHG4 buRceTYJnPY/N/X8dsREh2VZTYuM6E/41dXPIj9fuFN5S9ICnl1hnHPb9UnNmZjtbORP08qEQSDC1 muYKNgQL+Zvrcy2O3gKKQLqDpU0/l+qSy3IbFcpObtmIU3Z/yN1HQYoSxtPce5iICC+fM1aVayLVZ d+Mz8NxQ==; Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1qiGdF-00Bsvo-SH for linux-riscv@lists.infradead.org; Mon, 18 Sep 2023 15:57:55 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-59bfccec7f3so49161547b3.2 for ; Mon, 18 Sep 2023 08:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695052667; x=1695657467; darn=lists.infradead.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=lIjUnxprdj0PGVr4cRoUj9UNuJZGVJJ76esFBbZaYffI6DRyv3+1tySFasMWeT0A22 UIltduy2T4z241MGUbXqM1oWEpfGIBGPNVCeatDFFqmQBQoaELah2902DZeWzhI4GagL TPl7eMQMd4b57ynrwpWUzttU9CIoJMvMHGXzZBg+g9FusyZUqcny9u34m/yihIdnT55m BQsnwqPsmEF4U8e3QdVqckNMlwa/oSKA8T9B4w6g+eHvWUVi7mydXvNvSnHogGPcO2fg wEOLHINoQbkueflIu13fkQcloh4pI44z/WcvrW3R9xVDMknJ6plA3Sr8Ih4kpGlUpUJE 8agA== 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=fruoCfaaQVI/mQMPshf7b39Z7FEUmhj9s2K+SGFsy624Myi3OVbXS2feHEWscoZMHf t3+h+9OH7xWx8v8lWbrlGR54/gp+0pLfuMvB5L7ULzBDgQJZKlofaEXb1FuGiobSYM2N Vx/XR6KCA2XpVMkh/4VdpMojyMVwhSRgtRTotK1+oa2yOa0APoZ8UHwQkLQDDCn9W3jq fpxgVo7boG42ixZT0LjCl6nPcOOunU5A9y5/jbkX5snYYF1joCu6djyLBY6lFv7tp3eC gx87cMdoonsdLO1hKfdiihUgFHFZ3SX5D6hRN6UKMJqgdWOzw6Pcxk7IZHAh2Z946m3p 0s8A== X-Gm-Message-State: AOJu0YwCY2L9lb/kGpDHSvbyM6PLyvM1bdUCV7NZmc8HcS/QaJLNSDBH szLoJEZKqK8klTI84BGGt1zcZzGJPOI= X-Google-Smtp-Source: AGHT+IFqXVMaW5EWUR3sn7RRHAULv1S9Ax+JzluU+Y462jgw29bgpZAEkbL739S68Hx7QOlYkiFqSLcGAUw= 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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_165753_919901_C17DCC5F X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED656CD37B0 for ; Mon, 18 Sep 2023 15:58:43 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=uLTCgdve; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Rq8bk2qzLz3cGb for ; Tue, 19 Sep 2023 01:58:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=uLTCgdve; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--seanjc.bounces.google.com (client-ip=2607:f8b0:4864:20::114a; helo=mail-yw1-x114a.google.com; envelope-from=3e3mizqykdlikwsfbuyggydw.ugedafmphhu-vwndaklk.grdstk.gjy@flex--seanjc.bounces.google.com; receiver=lists.ozlabs.org) Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Rq8Zl73mHz3bZ1 for ; Tue, 19 Sep 2023 01:57:50 +1000 (AEST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-59bfccec7f3so49161557b3.2 for ; Mon, 18 Sep 2023 08:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695052667; x=1695657467; darn=lists.ozlabs.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=uLTCgdve2uvU2uK/hagYidt2A2+eAm/u2gtMwuc73vGz5a4Ef2KdtmJwDyz7SSEqWD HpKsK2AATLXT621/Qw39qvmMmy9SrN+f86fwyW5Ym5v2pO7q8eIbnNWzJy9GjrQyqfd3 yzc3/H1MVCCZkbfdGX9vH3l1IcEm7cDbcBAjfJFfFWUxm6+PfXyb5Ju9nb635ZqjvDLj J4xD5+1FLAuIYfSHRCHLCTt2KrZ9fDPVopCW3hdA6c2SjvttcZwKc7Y8WVEaGBjRSDDm qN6ZNEw7p+OWsfwIgUVsZKV0/lw4JXURCWDWJPxWADG0uzl4kS7vBFnKPAwL9HAZh/xb c/7w== 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=o0uGjVnRLxT0B4l+JOEpXz/4zT4H9D0W1902Q2xGB39jqTmFWfT2Sl/ae/lLonblHN rFQdo0sDzFoIOK96aif0VB4toyHXSFG40QiqT8V8yiB/bdYaXxDJW5rFl8zGLpmiG4B4 uwNfm4u+mlPw5vAkub42/qQx7ZQmuIreYEi9NJ9O+9QgIHM7O6brFk/H1NInjEfxxL6J w7zdTBqIEN2EmQBmsDQCNnjeKnc9v8Ci3xPgRmC/oTjdb+UgZ61DVTRjOEvhPeE9QBVi /OuJ83AzhoajIUmYuKqPoqR3RTus4/S+IletK4dzOfi2fcbYtYWLX2vD2tg7nIt5jpwY 4oWQ== X-Gm-Message-State: AOJu0YzOQHcnIBAFHtVUL/p3fq5t0uOkKFZn6RgW9vgxo9nG5JC1bPNy cvM+h1f7q75E7WXl/EoJljFurS6QBQQ= X-Google-Smtp-Source: AGHT+IFqXVMaW5EWUR3sn7RRHAULv1S9Ax+JzluU+Y462jgw29bgpZAEkbL739S68Hx7QOlYkiFqSLcGAUw= 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 Content-Type: text/plain; charset="us-ascii" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Hildenbrand , Yu Zhang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chao Peng , linux-riscv@lists.infradead.org, Isaku Yamahata , Paul Moore , Marc Zyngier , Huacai Chen , James Morris , "Matthew Wilcox \(Oracle\)" , Wang , Fuad Tabba , Jarkko Sakkinen , "Serge E. Hallyn" , Maciej Szmigiero , Albert Ou , Vlastimil Babka , Michael Roth , Ackerley Tng , Paul Walmsley , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Isaku Yamahata , Quentin Perret , Liam Merwick , linux-mips@vger.kernel.org, Oliver Upton , linux-security-module@vger.kernel.org, Palmer Dabbelt , "Kirill A . Shutemov" , kvm-riscv@lists.infradead.org, Anup Patel , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Andrew Morton , Vishal Annapurve , linuxppc-dev@lists.ozlabs.org, Xu Yilun , Anish Moorthy Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA86BC46CA1 for ; Mon, 18 Sep 2023 15:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=H4hQmgFe1cSAeRnUOL5QnJwTd6fN1fLs7GPDtEXNeU8=; b=qyClwYsuRBhiqBtk9nQ7ZH9cjc HYd0POdFtBVzFIfsjpUkNlllRYFbyRorcZ6P9lpWrsf5LJGS82i/JEt5OXmZ98DvnDcJ7IO8aiL45 ZZPB6f9CUftaoeV+anoYRkzB/BOQ0r1pUaiUy6VYM6l504rWVlT3oY83XGJP+/iBMWeBVsz0LSr98 WQ5TtuNdTpDStDgolxhtvXFVYRAooEKS2pNTK+1p8gRoeUJ4ttp8o+EPolUilJnBviFx6g45UURY2 sbvF92ahrpFzHoIvCYdK9F4dsuRHWZlokCzUhMDqOlaywJJ2nHF0jMZuWDumCJJyWIVzNouhn9m4D jxI0CKyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiGdL-00Fo3f-1R; Mon, 18 Sep 2023 15:57:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiGdK-00Fo3O-2S for linux-arm-kernel@bombadil.infradead.org; Mon, 18 Sep 2023 15:57:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=s17YssV/eLMk3v6BQw21PztJLVQ1uDSUDnGyHA0nJic=; b=IqI8XhH3QP8EptBttPqrWkQRIp TEuSCNVBqwtIwGnCTe86hc6W7v4lN4x+cVdy2m7dIvaWjOtwTZZ1wTacmRuPq0676D4u0B8QQNbu7 7WUz+9ATC5yBM76f3BXjWbYB+v+wVwGDs6w7ogXSdvUJaZvkC9mevXnluY3A8N0Iailgq7hgJAHG4 buRceTYJnPY/N/X8dsREh2VZTYuM6E/41dXPIj9fuFN5S9ICnl1hnHPb9UnNmZjtbORP08qEQSDC1 muYKNgQL+Zvrcy2O3gKKQLqDpU0/l+qSy3IbFcpObtmIU3Z/yN1HQYoSxtPce5iICC+fM1aVayLVZ d+Mz8NxQ==; Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1qiGdG-00Bsvn-67 for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2023 15:57:57 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-59c081a44afso42995057b3.3 for ; Mon, 18 Sep 2023 08:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695052667; x=1695657467; darn=lists.infradead.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=lIjUnxprdj0PGVr4cRoUj9UNuJZGVJJ76esFBbZaYffI6DRyv3+1tySFasMWeT0A22 UIltduy2T4z241MGUbXqM1oWEpfGIBGPNVCeatDFFqmQBQoaELah2902DZeWzhI4GagL TPl7eMQMd4b57ynrwpWUzttU9CIoJMvMHGXzZBg+g9FusyZUqcny9u34m/yihIdnT55m BQsnwqPsmEF4U8e3QdVqckNMlwa/oSKA8T9B4w6g+eHvWUVi7mydXvNvSnHogGPcO2fg wEOLHINoQbkueflIu13fkQcloh4pI44z/WcvrW3R9xVDMknJ6plA3Sr8Ih4kpGlUpUJE 8agA== 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=Grj/3jY6BeX8M/kIoPdw2Q5RAJB2JcOVGbufNwlHHYrBP/CrKtvSeIZyuO53Nj54a7 SN6XeQqdxev6Q9YwkZJ8n8PDDMWZEazJ2XTW8xJ+8s3rQsI8tn9a8h06HA072Vo/km2y nelJRu+F6mB5xOSBzhm0/keh29YkCE7qXxKwaoailrhkBGRqK1lcCRPJxrDWlh9DTaZh yhdrmfFagO7i3aEcJ7txHJL8ajDP6ALKg1EgaHhIDAcOc3s29PlL0Xi5QxiZCqtsyH8n CFLesNBJfEfZ+fBdUsJUryicnRbTcm/dS5nCwkZgZ4uDHR6rOTwCglLYvsQvExdSxKBU uQlQ== X-Gm-Message-State: AOJu0Yy5PH1ojl6HuVHMV4tyItEdDtSM//5DFE5KkLqrL/vH985XKux2 mHDvPR6wPajQg2vJ/sUl3T0cxvFkmFw= X-Google-Smtp-Source: AGHT+IFqXVMaW5EWUR3sn7RRHAULv1S9Ax+JzluU+Y462jgw29bgpZAEkbL739S68Hx7QOlYkiFqSLcGAUw= 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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_165754_239740_5DAD74A7 X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel