Message ID | 20230718234512.1690985-5-seanjc@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CC5FEB64DD for <linux-mm@archiver.kernel.org>; Tue, 18 Jul 2023 23:48:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B5FAB8D0023; Tue, 18 Jul 2023 19:48:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE9388D0012; Tue, 18 Jul 2023 19:48:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 961DD8D0023; Tue, 18 Jul 2023 19:48:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 827148D0012 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 19:48:42 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 43F5540505 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 23:48:42 +0000 (UTC) X-FDA: 81026374884.03.750339A Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf23.hostedemail.com (Postfix) with ESMTP id 5F9F614001A for <linux-mm@kvack.org>; Tue, 18 Jul 2023 23:48:40 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=kxtMkPfB; spf=pass (imf23.hostedemail.com: domain of 31yS3ZAYKCCoYKGTPIMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=31yS3ZAYKCCoYKGTPIMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--seanjc.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689724120; h=from:from:sender:reply-to: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WUfCrqcqzPgtS1UwKv933k1oCAb1hY7UF4nDFC6XfxY=; b=HPvR5XSYPP/OcNjLzGpd2hkr/J0Cr73ctaqERKG6CTKQPJIjTfpoSt1JfvzSw+Wls9Ra7d 8U9SAaHCRHsSe6067sz4nMWwDBWoCbXlSQV+iRXUXPdb5pAprb6IS2/7KTThJJVwS4Rxq4 HVYyLLYumoidukVp+Ir+qyqmrHE1nOc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689724120; a=rsa-sha256; cv=none; b=e5wI+JxRzF+/iydkM/lrFDVDMVtqztoAezS1xIsvqBZ+YaMAFJ1QkRdwEA9rzzOahhg34s wg/pW2i1HsfKdA1m4FyjjFG4jcmUPwovb8e27edOL/qbriqqAPzeA+DmwK+5NV9ZpH8yGF 5W9ReVhJaUnCyvTvaR7kDqF7+qNeFs0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=kxtMkPfB; spf=pass (imf23.hostedemail.com: domain of 31yS3ZAYKCCoYKGTPIMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=31yS3ZAYKCCoYKGTPIMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--seanjc.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-1b8af49a5d2so48846465ad.2 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 16:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689724119; x=1692316119; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=WUfCrqcqzPgtS1UwKv933k1oCAb1hY7UF4nDFC6XfxY=; b=kxtMkPfBzSrDgFwiM6lTbnnV1ORifom1wTCX0JDc2o8v5mvJbgd+eW3FzBholZ+QF/ ZB/tw1vxVtp6lnWfOuYWDBnkA/zcHKeYCxsNI4yLGBDWisxt2V2CGW6+/c9nKHHqWO0Z pwjXyxzIVoB/8QMRAPYJ2ESVagoDqveLkahmzeblrfSHi+C7b/LSvjVeGXXFBmG27xpW 46+iHLUL/iDL1W1dNobEnmnSwB6oZXJ54GsRbQDHUEuzlNSG0pgY2rC5/BfRYynN9jnl 9GH+3FZfZFTDU0qQSnRrsV2OdAHlQuwXUaGl7W047p5QIleFQWR+9FWJ+QSsSRbSbDcH Ypxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689724119; x=1692316119; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WUfCrqcqzPgtS1UwKv933k1oCAb1hY7UF4nDFC6XfxY=; b=gMVqars0DAqW8AZcgdh3/OiwiIAkwvTfCl48lQlEclBV4rkXIK+2aUG6DSjoxDUKnb V0KbY1F+yNsEwabag1r9r1ct9yoqczggjDEiocnvKw9rySZRGNAqrxrnUt3GHKIvV0wr 9vWlhzD5B4QInlGJAea7Caa6umzlNBGiF6qzzOyJXeGgw5+bosI4zEB1ZJWqgjkghVKH 5I7Q3zXGT9yvyGaF0o0nQvmneiU60PI+PoZtRRTScxtcA+x182sfRNWKq1rfqS8hApMs fSi1vOp/B3gpIVrcOq4cWPDjbADAjTkvZ/q5Obhi6FcVZPmmiP+QSMz7gk30AwGYXZI3 pp7Q== X-Gm-Message-State: ABy/qLYqPhhTwUwMizVjSjiyQ3BHlpkf1aDVgNNLIiP90VGKGXbBvhn5 fXlxZxhHYrLV+9xCmoGeLTtB9nDHCSE= X-Google-Smtp-Source: APBJJlEMcu/rfMRBwbQ2zq+ymY4hD2c5F3AYtj0FSwyildZO2Oo0gOzBKGYbg9jbJCtpjTvhx4PmM9/8MPA= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:f546:b0:1b8:a552:c8c9 with SMTP id h6-20020a170902f54600b001b8a552c8c9mr7279plf.13.1689724119324; Tue, 18 Jul 2023 16:48:39 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Tue, 18 Jul 2023 16:44:47 -0700 In-Reply-To: <20230718234512.1690985-1-seanjc@google.com> Mime-Version: 1.0 References: <20230718234512.1690985-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog Message-ID: <20230718234512.1690985-5-seanjc@google.com> Subject: [RFC PATCH v11 04/29] KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, Huacai Chen <chenhuacai@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Sean Christopherson <seanjc@google.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com> 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, Chao Peng <chao.p.peng@linux.intel.com>, Fuad Tabba <tabba@google.com>, Jarkko Sakkinen <jarkko@kernel.org>, Yu Zhang <yu.c.zhang@linux.intel.com>, Vishal Annapurve <vannapurve@google.com>, Ackerley Tng <ackerleytng@google.com>, Maciej Szmigiero <mail@maciej.szmigiero.name>, Vlastimil Babka <vbabka@suse.cz>, David Hildenbrand <david@redhat.com>, Quentin Perret <qperret@google.com>, Michael Roth <michael.roth@amd.com>, Wang <wei.w.wang@intel.com>, Liam Merwick <liam.merwick@oracle.com>, Isaku Yamahata <isaku.yamahata@gmail.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: am7ipjugthoned14kobu8rk6pnq3mnwi X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 5F9F614001A X-Rspam-User: X-HE-Tag: 1689724120-52248 X-HE-Meta: U2FsdGVkX18IDDmVNp5TWOBkvH6EDltEezrz3HrDyLjqzrUAjJ7Sxlb1027CJIVHytvBcRey2HT41FZt5MWFcL77mtF6L3qgwDsK5lcofpaUCiZUHmzlrO5m62wkZqVLkVglgHWQO/nTa3YthEqEv3XHdbsG1Cv9aikWSh3/UzZtjXDgyl2PcLqgJDTvPybVkBnJlycw/UMOzjixMhpy2RrxZ4st+C9+cYIU8PHCg+gvvovjhoV1buF0mW1OVZLz3CW8K0Ac343dXFCyqXpafdfCliuJ012XOEAxyf8riojol1S7hNG0Is+AR3I4Fy7oJH2Pjy06UZ/kv4wxvWbas4Cr6ZaI8+axynVLhYcNHV8Bps2ZEPXvhV6yD+aR7H/OlytlkK3GmZoxyYIchEtmhFUL3mffkAU4aQfvUU78PMAwFYI+vZ12zklq2bNJAokbYhpzki5kSeo9AZntXKJYCdnygePYkLU/KysgAqwxYON9TI8djTkNey6ERAVM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WXg1ZQpbpFRiLyCaqaFGL4vkciuaZo4Gs1FlZ23gGOrOv0rwYuLMTZSlK1fTZKsXPSxcye90aOvXEmVLrcQYeEkxqjhhVmLCTSmRcCArVNjHmduJIcK/KbYZfFJbPVKl914RLUD9K6RdOWvC6WEvDzVgfmR0tU3oSgxQujeAy6DBk+LbZgVqFrX9tFH+jU02VGWjHV+3n2XpQ57F95LO1tDvQyXOZbl4ENabfVaiMxokfaSrlwUo4ANSUiX X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
KVM: guest_memfd() and per-page attributes
|
expand
|
On 7/19/23 01:44, Sean Christopherson wrote: > Signed-off-by: Sean Christopherson<seanjc@google.com> > --- > arch/powerpc/kvm/powerpc.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index 7197c8256668..5cf9e5e3112a 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -634,10 +634,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) > case KVM_CAP_SYNC_MMU: > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE > r = hv_enabled; This could actually be unnecessarily conservative. Even book3s_pr.c knows how to do unmap and set_spte, so it should be able to support KVM_CAP_SYNC_MMU. Alex, Nick, do you remember any of this? This would mean moving KVM_CAP_SYNC_MMU to virt/kvm/kvm_main.c, which is nice. Paolo > -#elif defined(KVM_ARCH_WANT_MMU_NOTIFIER) > - r = 1; > #else > - r = 0; > +#ifndef KVM_ARCH_WANT_MMU_NOTIFIER > + BUILD_BUG(); > +#endif > + r = 1; > #endif > break; > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 7197c8256668..5cf9e5e3112a 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -634,10 +634,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_SYNC_MMU: #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE r = hv_enabled; -#elif defined(KVM_ARCH_WANT_MMU_NOTIFIER) - r = 1; #else - r = 0; +#ifndef KVM_ARCH_WANT_MMU_NOTIFIER + BUILD_BUG(); +#endif + r = 1; #endif break; #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
Signed-off-by: Sean Christopherson <seanjc@google.com> --- arch/powerpc/kvm/powerpc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)