Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp882860rdb; Wed, 1 Nov 2023 05:52:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNBS5/DBQ8y2IwxmK34fWy3SGf4YsrdITaEcwaiWquk1I+/ihwOVr47clH6+MKtg4UReuZ X-Received: by 2002:a17:90b:1081:b0:280:a491:abff with SMTP id gj1-20020a17090b108100b00280a491abffmr3591103pjb.5.1698843138428; Wed, 01 Nov 2023 05:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698843138; cv=none; d=google.com; s=arc-20160816; b=v35T9HvcsdbaV8bE61pYrNmp+2jZV2HDMghvRBqQGWlTy3Z59VdgSoZ6jHXZmaLCof i6MJQWxNTWSf/uBiXBrWCr52qEsl1IV5i31iBFhGdWzPsVVN+JP/Bvz3kXDLemgTd1Jh PXmKppPGYnL4/C4f0xazdf9YZ3SBTiXR8cevtuhtSTvuMi1OI0rbHmdInL4jGwvuhIeo dWh/o3cEx2ZEgLGT9KO16j3D8QQtfu4hh3/g9VHlR4dj2K4Gy0QAGvU164TdFwfK7IJw oVEIhPP7ZHLpgJYgta8/xcoZUSMjA/qlctlJ7LmxM4DYoxXCDDAMbVHUrbSRhbuK6J6Q 7RUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=d3o84LhG/JDs4XT09LqOqAL557WR+kTbV5Toac0tgZE=; fh=xK+wiX2TTq7O2X4TlNj4MXVc7h6ma8eyuy1Ur/RMLHE=; b=r2bUjx7Hi6EePSh8MYO9ZBaINfEdbVrlrz2tNILASao7Dk6bD6z1bbiRm4dRBVEjM2 jcm9c4KmyPch/vHAPXIBSzNo4H8L9/kuUUbRn6c/NHpGb7ZyOXSauKChQoXRNqpNzOki U0oG+1bSwq3cjnU1yAKNtGQycqIhGbzb2pGgnG+8xLF1OUayhdkJ8YRLaI784rxl8bIr 6Iw3gws+VmqzI3WHet9elg3ahCryStEAFB9C5C3CHG5jzHGzQ4sbPJiAjbdNk87ygCia GH/J7Otn+hrZ/V4Hjj17AM0+9Ik7P8S5luW/d8X4l4scOs4jQkhIxmVA8Oxx3P6WVN3J DDqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=v29IL5Vy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id mr9-20020a17090b238900b00274d3f62044si752387pjb.111.2023.11.01.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 05:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=v29IL5Vy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id B566C8084060; Wed, 1 Nov 2023 05:52:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343771AbjKAMwC (ORCPT + 99 others); Wed, 1 Nov 2023 08:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbjKAMwB (ORCPT ); Wed, 1 Nov 2023 08:52:01 -0400 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F3F7B7 for ; Wed, 1 Nov 2023 05:51:56 -0700 (PDT) Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-49dd3bb5348so2769735e0c.0 for ; Wed, 01 Nov 2023 05:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698843115; x=1699447915; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d3o84LhG/JDs4XT09LqOqAL557WR+kTbV5Toac0tgZE=; b=v29IL5VyU3B+aIfMrMdmbix8p5RVup/xW4vUd6RBnr33Bu8rfYh4G9v+WM1qpVJypq gUqbJSpQOqW37W/djoRJRIkKHZzIrcfejcAVmEP62zMyHDrCtUV8o5xm9kmK0A5uXqpN apJ1xeSyhmnijeGDVHeBGftbSrruIvUPi1PhaD+ZY5fJYApRylMJb9TK7eDjeoSvgGgS fGgQaVG7lCLuPpTDIcraWrc5yHng2VtxHRAKVcjqPT7wuVWgNcUO2wyZf05wsrfCjkOW LFomWquwgrI4aiqOJaMRYMEiqNFRO4P8TGYhaKNN5Qy9bJ5LxbPFHzUI5OiqEo5kfxQy 2+Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698843115; x=1699447915; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d3o84LhG/JDs4XT09LqOqAL557WR+kTbV5Toac0tgZE=; b=ZLsPOo1lFWxlwb5m9FZVLOEeo+NRmU7Pp+E3rEHQOEJg29PbFFGUCjFJUChDunhdK1 0L5EKID4pZNOMsB44u0rWTk0aM/Z9wm/LutqWXUYEon8nDRCzGgllxXqXJvZs2uOvBwg j9G0UOb0n6NQg2caNFOJKVwOqW8KAJAUf68qS07oLJDEmIzW3GhBbkH6yltPp4IJonGE fBW1n91jj7s4sBvbS338ef5SzBKvV/0Bx9qM46WaLRLrLTv/G6kVO+GQ9XFjDrvQ3OJG DKQtEOEA5xfhevewZnjv/bMDJ+zJDzHHQI0r1GDAW+QGpyRTVVezVK+Zm0WN/4hjnLXC oiDw== X-Gm-Message-State: AOJu0YxjWpzskfFu6pKFddF26wFqoRz+CsZXkeBPsD3bpXGr4RPFf2pE 0GoYbGd3kgNTWPUz/dGMRAxX7FXF08YRwo6RUY/eIQ== X-Received: by 2002:a1f:9b13:0:b0:4a1:7278:3bf5 with SMTP id d19-20020a1f9b13000000b004a172783bf5mr13903007vke.4.1698843115068; Wed, 01 Nov 2023 05:51:55 -0700 (PDT) MIME-Version: 1.0 References: <20231027182217.3615211-1-seanjc@google.com> <20231027182217.3615211-6-seanjc@google.com> In-Reply-To: <20231027182217.3615211-6-seanjc@google.com> From: Fuad Tabba Date: Wed, 1 Nov 2023 12:51:19 +0000 Message-ID: Subject: Re: [PATCH v13 05/35] KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , "Matthew Wilcox (Oracle)" , Andrew Morton , 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-kernel@vger.kernel.org, Xiaoyao Li , Xu Yilun , Chao Peng , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , 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="UTF-8" Content-Transfer-Encoding: quoted-printable 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,T_SCC_BODY_TEXT_LINE, 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 05:52:16 -0700 (PDT) On Fri, Oct 27, 2023 at 7:22=E2=80=AFPM Sean Christopherson wrote: > > Assert that both KVM_ARCH_WANT_MMU_NOTIFIER and CONFIG_MMU_NOTIFIER are > defined when KVM is enabled, and return '1' unconditionally for the > CONFIG_KVM_BOOK3S_HV_POSSIBLE=3Dn path. All flavors of PPC support for K= VM > select MMU_NOTIFIER, and KVM_ARCH_WANT_MMU_NOTIFIER is unconditionally > defined by arch/powerpc/include/asm/kvm_host.h. > > Effectively dropping use of KVM_ARCH_WANT_MMU_NOTIFIER will simplify a > future cleanup to turn KVM_ARCH_WANT_MMU_NOTIFIER into a Kconfig, i.e. > will allow combining all of the > > #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) > > checks into a single > > #ifdef CONFIG_KVM_GENERIC_MMU_NOTIFIER > > without having to worry about PPC's "bare" usage of > KVM_ARCH_WANT_MMU_NOTIFIER. > > Signed-off-by: Sean Christopherson > --- Reviewed-by: Fuad Tabba Cheers, /fuad > 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..b0a512ede764 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -632,12 +632,13 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, l= ong ext) > break; > #endif > case KVM_CAP_SYNC_MMU: > +#if !defined(CONFIG_MMU_NOTIFIER) || !defined(KVM_ARCH_WANT_MMU_NOTIFIER= ) > + BUILD_BUG(); > +#endif > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE > r =3D hv_enabled; > -#elif defined(KVM_ARCH_WANT_MMU_NOTIFIER) > - r =3D 1; > #else > - r =3D 0; > + r =3D 1; > #endif > break; > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE > -- > 2.42.0.820.g83a721a137-goog >