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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6592C43217 for ; Mon, 7 Nov 2022 03:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbiKGDFV (ORCPT ); Sun, 6 Nov 2022 22:05:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230302AbiKGDFR (ORCPT ); Sun, 6 Nov 2022 22:05:17 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9109560FF for ; Sun, 6 Nov 2022 19:05:16 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id d26so26666697eje.10 for ; Sun, 06 Nov 2022 19:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=O2GdYT7cMyZAwXXzVaGGer2516sCwb8nVa+3zH1uKyisQxoW9HAvhvHCOOJeufiTbl F3Np7E0Q60MoiXXzv7QKKfVpPuct8EOqbYhrz0wkX1SdRI+8oB73JExLBlUhlEORndI0 oR5Ci6Q9Zji0dGkOeDy61S11yj8qgzFtdaxDEMNt1vXTTwBDofXJXEd/zzO2opd/NDJm j1f/gZ4KRV3uPIBqcQXujsk4akPpTe+2a2n4m0j+UpZ//j9kycunMnHpdO3L/Ji7eqnQ U523Q+8cijpVSXguZZnGJMRJTHTEr5k6EgUTEZqzTJSespExVQpXPGZ+H7/pFHIEuIGk PlTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=0GdjoDFa5v5krUxUd+UDLBpi199Ti0b+oKTP3HspDZCv4GYwy+WAAnPBodVISvAPZj hlxIEIibJ+ZcGIxNYMfgrCfvDbwbeGCXuwPQhnkrzQTpwxtOy4DIlp4UdVJz/wsafles WzMnILGEO1tCnprahdYUURRg6l9GpnuaTtkLFBbNO4uPETzLGwt3D9XvyVRxX2BZtEkU +KBX6nEmpn6JC8H6g186Ol9wobtnyJMMhAUeWXT9L7P8+MGGkpvcAZFZOr4dD6ftctLR +huTFni8MJACHsSPoKSZCJGOHEl3PS0j5jzUKtCgHW+9Lb03P5nTpfnWAt18AfwUFvGw n2RQ== X-Gm-Message-State: ACrzQf1X6yAt2xhHqpRmYooKxYxf9GczRlWFRRpmGQ+b3mmFUTeHfvXL zoZq5R8VF3z6ziPQ7kyJ+PqXW0yMB7GU0HhgD8uRlQ== X-Google-Smtp-Source: AMsMyM525hQagKYMIlOIdqQEy/Sx/ht089FGqr8YQw810BAnhG6hulq/sfu3BFpHCBMEkVy5m+xwSwFEwA0SvamrVJs= X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr46182007ejb.230.1667790314965; Sun, 06 Nov 2022 19:05:14 -0800 (PST) MIME-Version: 1.0 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-23-seanjc@google.com> In-Reply-To: <20221102231911.3107438-23-seanjc@google.com> From: Anup Patel Date: Mon, 7 Nov 2022 08:35:03 +0530 Message-ID: Subject: Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Isaku Yamahata , Fabiano Rosas , Michael Ellerman , Chao Gao , Thomas Gleixner , Yuan Yao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 3, 2022 at 4:49 AM Sean Christopherson wrote: > > Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of > bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a > glorified nop as invoking kvm_arch_init() is the very first action > performed by kvm_init(). > > Moving setup to riscv_kvm_init(), which is tagged __init, will allow > tagging more functions and data with __init and __ro_after_init. And > emptying kvm_arch_init() will allow dropping the hook entirely once all > architecture implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/main.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c > index a146fa0ce4d2..cb063b8a9a0f 100644 > --- a/arch/riscv/kvm/main.c > +++ b/arch/riscv/kvm/main.c > @@ -66,6 +66,15 @@ void kvm_arch_hardware_disable(void) > } > > int kvm_arch_init(void *opaque) > +{ > + return 0; > +} > + > +void kvm_arch_exit(void) > +{ > +} > + > +static int __init riscv_kvm_init(void) > { > const char *str; > > @@ -110,15 +119,6 @@ int kvm_arch_init(void *opaque) > > kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits()); > > - return 0; > -} > - > -void kvm_arch_exit(void) > -{ > -} > - > -static int __init riscv_kvm_init(void) > -{ > return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > } > module_init(riscv_kvm_init); > -- > 2.38.1.431.g37b22c650d-goog > 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 5B519C4332F for ; Mon, 7 Nov 2022 03:05:39 +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:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=imV9FIBV2+jWjfBQBchToXrtmtrOk+nj7TjWWG8WV9s=; b=cNnbXPyfU/twYl Hw8u9rXYXRb8de9v/5nUqT3VOrt+h4avZgkyyo8tcfDa40lOws6Sx4NgxhE2lq0IAgFDS7bucBFTC yJWtgiNg00hf1hUpALbSz/EJsNIMA38pc05P7LZdJIvJPVYdIGKuMR3KZgI+M7fUpgCotCOLgNRIT 46ymfDaGqIGZhAEgoT4dyBwM/3/IQyUnmKv9aaciH+z41Ofmf4oiQRr6qVx2zjUEjFAW2QdBR5sBC YD0tmYvC64WdpOtHQ5g/jQEJhtgOAtBbUc0Daoj8fQF2ZvE29UFwK2kWDAqzt3FVtF8mnI91xHpV/ 7moF/oucIa7fSffSXCgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1orsS0-00BDwp-Fn; Mon, 07 Nov 2022 03:05:28 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1orsRp-00BDto-KW for linux-riscv@lists.infradead.org; Mon, 07 Nov 2022 03:05:19 +0000 Received: by mail-ej1-x633.google.com with SMTP id sc25so26619078ejc.12 for ; Sun, 06 Nov 2022 19:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=O2GdYT7cMyZAwXXzVaGGer2516sCwb8nVa+3zH1uKyisQxoW9HAvhvHCOOJeufiTbl F3Np7E0Q60MoiXXzv7QKKfVpPuct8EOqbYhrz0wkX1SdRI+8oB73JExLBlUhlEORndI0 oR5Ci6Q9Zji0dGkOeDy61S11yj8qgzFtdaxDEMNt1vXTTwBDofXJXEd/zzO2opd/NDJm j1f/gZ4KRV3uPIBqcQXujsk4akPpTe+2a2n4m0j+UpZ//j9kycunMnHpdO3L/Ji7eqnQ U523Q+8cijpVSXguZZnGJMRJTHTEr5k6EgUTEZqzTJSespExVQpXPGZ+H7/pFHIEuIGk PlTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=6OKNkfVXGqnsqRKzluxTMQ8Wkzon9ique0PdN77tDN5LGIZjdVnfK1825guyr1umQE i50E3rgtH+4fdlU7161LL1xrkvYqR4l4J3uoRWfUIcEfSQdsTS4Rw613q6KvYKwxwBo2 6kF42u8BdO3gRM5CmPmWPE9+ND+AkBfre8Zz9EhViwLEhS5PkCAv+0WSMT+bNPUUeyJs YSk1pegodIoLlJLCPdXPeqc40SoH/lMyN+gRLeYOM2cvtQLxHY35NRbS/fmPiJhhpyM2 ieKLWIvwwiMT7cpkmKnqE4caGLZ5CrvUXuvYY60pSzDj5T8hhrz7IxhqspVxpMWGFn0q gOMw== X-Gm-Message-State: ACrzQf2qb7GfX2OLMb1Rp6CeVYR6U0lVfE3Dzn31J9gJf0C3eYTuH6uu UvM+rbzepr4d/6NdK0zzCVAqxlyd71ciRYtHfyNqkQ== X-Google-Smtp-Source: AMsMyM525hQagKYMIlOIdqQEy/Sx/ht089FGqr8YQw810BAnhG6hulq/sfu3BFpHCBMEkVy5m+xwSwFEwA0SvamrVJs= X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr46182007ejb.230.1667790314965; Sun, 06 Nov 2022 19:05:14 -0800 (PST) MIME-Version: 1.0 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-23-seanjc@google.com> In-Reply-To: <20221102231911.3107438-23-seanjc@google.com> From: Anup Patel Date: Mon, 7 Nov 2022 08:35:03 +0530 Message-ID: Subject: Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Isaku Yamahata , Fabiano Rosas , Michael Ellerman , Chao Gao , Thomas Gleixner , Yuan Yao X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221106_190517_702305_B91D21C1 X-CRM114-Status: GOOD ( 15.60 ) 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 Thu, Nov 3, 2022 at 4:49 AM Sean Christopherson wrote: > > Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of > bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a > glorified nop as invoking kvm_arch_init() is the very first action > performed by kvm_init(). > > Moving setup to riscv_kvm_init(), which is tagged __init, will allow > tagging more functions and data with __init and __ro_after_init. And > emptying kvm_arch_init() will allow dropping the hook entirely once all > architecture implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/main.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c > index a146fa0ce4d2..cb063b8a9a0f 100644 > --- a/arch/riscv/kvm/main.c > +++ b/arch/riscv/kvm/main.c > @@ -66,6 +66,15 @@ void kvm_arch_hardware_disable(void) > } > > int kvm_arch_init(void *opaque) > +{ > + return 0; > +} > + > +void kvm_arch_exit(void) > +{ > +} > + > +static int __init riscv_kvm_init(void) > { > const char *str; > > @@ -110,15 +119,6 @@ int kvm_arch_init(void *opaque) > > kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits()); > > - return 0; > -} > - > -void kvm_arch_exit(void) > -{ > -} > - > -static int __init riscv_kvm_init(void) > -{ > return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > } > module_init(riscv_kvm_init); > -- > 2.38.1.431.g37b22c650d-goog > _______________________________________________ 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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EF7DC43219 for ; Mon, 7 Nov 2022 03:05:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6F8CA4B8A5; Sun, 6 Nov 2022 22:05:20 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@brainfault-org.20210112.gappssmtp.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fD-7m3yxQR6L; Sun, 6 Nov 2022 22:05:19 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4713C4B88A; Sun, 6 Nov 2022 22:05:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A3FC44B86D for ; Sun, 6 Nov 2022 22:05:17 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XH0LBlLXIMyX for ; Sun, 6 Nov 2022 22:05:16 -0500 (EST) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 3363C4B868 for ; Sun, 6 Nov 2022 22:05:16 -0500 (EST) Received: by mail-ej1-f49.google.com with SMTP id k2so26739390ejr.2 for ; Sun, 06 Nov 2022 19:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=O2GdYT7cMyZAwXXzVaGGer2516sCwb8nVa+3zH1uKyisQxoW9HAvhvHCOOJeufiTbl F3Np7E0Q60MoiXXzv7QKKfVpPuct8EOqbYhrz0wkX1SdRI+8oB73JExLBlUhlEORndI0 oR5Ci6Q9Zji0dGkOeDy61S11yj8qgzFtdaxDEMNt1vXTTwBDofXJXEd/zzO2opd/NDJm j1f/gZ4KRV3uPIBqcQXujsk4akPpTe+2a2n4m0j+UpZ//j9kycunMnHpdO3L/Ji7eqnQ U523Q+8cijpVSXguZZnGJMRJTHTEr5k6EgUTEZqzTJSespExVQpXPGZ+H7/pFHIEuIGk PlTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=5mianHaBy8SiL8jpdi3HI1BgY3ue7zfWHVfEdbTJ5mqJio6D0B+BTLph0LEgxGo4T0 D9y1NwRxFhPlzUjsmTTIT7wp3EsSfsO54L9LzM+vEGMNfWFWTVFxSqnRcq+jZo2ryIdm ZmJeBSmKgCt0890tQ22ImSRDf8b5KnFVx3qKHY4zhYvIFW5pAIYaGfQO9xU4dP1SfJc2 PhiRDIlNdR+QQrwyc0yMwnknXf5By1lPUEIkZKEoHAGSDoP273a8PTrLsAUHGYVyNoVb LBXrGVKbcMpXdc5sXoNXwR3huRBy3o1ANeKhNm5mwQbrCBevd8MOIJJK/4U+BOx9nJ1d nYFA== X-Gm-Message-State: ACrzQf2HWASgzN/TGICANo9fcTo+nHXO9KmptpFuyFYGAhBkBWkIoWkw o112OEwHZkjvlrKMYjvwJY13nWCr5LTCJOMJk+W57A== X-Google-Smtp-Source: AMsMyM525hQagKYMIlOIdqQEy/Sx/ht089FGqr8YQw810BAnhG6hulq/sfu3BFpHCBMEkVy5m+xwSwFEwA0SvamrVJs= X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr46182007ejb.230.1667790314965; Sun, 06 Nov 2022 19:05:14 -0800 (PST) MIME-Version: 1.0 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-23-seanjc@google.com> In-Reply-To: <20221102231911.3107438-23-seanjc@google.com> From: Anup Patel Date: Mon, 7 Nov 2022 08:35:03 +0530 Message-ID: Subject: Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() To: Sean Christopherson Cc: Matthew Rosato , David Hildenbrand , Yuan Yao , Paul Walmsley , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, linux-s390@vger.kernel.org, Janosch Frank , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Christian Borntraeger , Chao Gao , Eric Farman , Albert Ou , kvm@vger.kernel.org, Atish Patra , kvmarm@lists.linux.dev, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Isaku Yamahata , Fabiano Rosas , linux-mips@vger.kernel.org, Palmer Dabbelt , kvm-riscv@lists.infradead.org, Michael Ellerman , Paolo Bonzini , Vitaly Kuznetsov , linuxppc-dev@lists.ozlabs.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, Nov 3, 2022 at 4:49 AM Sean Christopherson wrote: > > Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of > bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a > glorified nop as invoking kvm_arch_init() is the very first action > performed by kvm_init(). > > Moving setup to riscv_kvm_init(), which is tagged __init, will allow > tagging more functions and data with __init and __ro_after_init. And > emptying kvm_arch_init() will allow dropping the hook entirely once all > architecture implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/main.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c > index a146fa0ce4d2..cb063b8a9a0f 100644 > --- a/arch/riscv/kvm/main.c > +++ b/arch/riscv/kvm/main.c > @@ -66,6 +66,15 @@ void kvm_arch_hardware_disable(void) > } > > int kvm_arch_init(void *opaque) > +{ > + return 0; > +} > + > +void kvm_arch_exit(void) > +{ > +} > + > +static int __init riscv_kvm_init(void) > { > const char *str; > > @@ -110,15 +119,6 @@ int kvm_arch_init(void *opaque) > > kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits()); > > - return 0; > -} > - > -void kvm_arch_exit(void) > -{ > -} > - > -static int __init riscv_kvm_init(void) > -{ > return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > } > module_init(riscv_kvm_init); > -- > 2.38.1.431.g37b22c650d-goog > _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 19231C4332F for ; Mon, 7 Nov 2022 03:06:14 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4N5GMm43fSz3ccr for ; Mon, 7 Nov 2022 14:06:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=brainfault-org.20210112.gappssmtp.com header.i=@brainfault-org.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=O2GdYT7c; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=brainfault.org (client-ip=2a00:1450:4864:20::62f; helo=mail-ej1-x62f.google.com; envelope-from=anup@brainfault.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=brainfault-org.20210112.gappssmtp.com header.i=@brainfault-org.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=O2GdYT7c; dkim-atps=neutral Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 4N5GLl1S5Lz3bm9 for ; Mon, 7 Nov 2022 14:05:19 +1100 (AEDT) Received: by mail-ej1-x62f.google.com with SMTP id b2so26704617eja.6 for ; Sun, 06 Nov 2022 19:05:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=O2GdYT7cMyZAwXXzVaGGer2516sCwb8nVa+3zH1uKyisQxoW9HAvhvHCOOJeufiTbl F3Np7E0Q60MoiXXzv7QKKfVpPuct8EOqbYhrz0wkX1SdRI+8oB73JExLBlUhlEORndI0 oR5Ci6Q9Zji0dGkOeDy61S11yj8qgzFtdaxDEMNt1vXTTwBDofXJXEd/zzO2opd/NDJm j1f/gZ4KRV3uPIBqcQXujsk4akPpTe+2a2n4m0j+UpZ//j9kycunMnHpdO3L/Ji7eqnQ U523Q+8cijpVSXguZZnGJMRJTHTEr5k6EgUTEZqzTJSespExVQpXPGZ+H7/pFHIEuIGk PlTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=RO5x1HaTfAquo0Q1EjQq0OMnA7cUNscju9k3+R5haSMqA7Bvl8A93TxQvkxvx08VR4 +ITjjXhrdF17gtxYSAeDvGLpfJ9U6IkF79sn5zWfTOs2uB7MYwZ2L+XfJ46VFll1R04p OeiMF7Gt/y3or+ebDglzK2bdyjfyL1wJiL2IiJBkS0CPrTd4PoChAzRFS61kr0PFLvxl AZfiFExKmMcnyejDOR7J7b0qgJBajFgELLWKi7zN2cwTKcqZLj+vYs5GONcbehl31xZ1 o9HsnaB8J5nWiYNOirTh0abpXdpGv+o6WL4mPCeNDpBMPBFDzdpPd6Oq8EypbVJ2ALne 5wQA== X-Gm-Message-State: ACrzQf0rlXQhYWAcSVy1E8f4pfsGGU7jKl6mNaJgfK8e9PI1hD/hJ5Mg oVYTFZQDWqyTnhXfoAReiAmlpYHMANEklslbjsH/Uw== X-Google-Smtp-Source: AMsMyM525hQagKYMIlOIdqQEy/Sx/ht089FGqr8YQw810BAnhG6hulq/sfu3BFpHCBMEkVy5m+xwSwFEwA0SvamrVJs= X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr46182007ejb.230.1667790314965; Sun, 06 Nov 2022 19:05:14 -0800 (PST) MIME-Version: 1.0 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-23-seanjc@google.com> In-Reply-To: <20221102231911.3107438-23-seanjc@google.com> From: Anup Patel Date: Mon, 7 Nov 2022 08:35:03 +0530 Message-ID: Subject: Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() To: Sean Christopherson Content-Type: text/plain; charset="UTF-8" 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: Matthew Rosato , David Hildenbrand , Yuan Yao , Paul Walmsley , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, linux-s390@vger.kernel.org, Janosch Frank , Marc Zyngier , Huacai Chen , Aleksandar Markovic , James Morse , Christian Borntraeger , Chao Gao , Eric Farman , Albert Ou , Suzuki K Poulose , kvm@vger.kernel.org, Atish Patra , kvmarm@lists.linux.dev, Thomas Gleixner , Alexandru Elisei , linux-arm-kernel@lists.infradead.org, Isaku Yamahata , Fabiano Rosas , linux-mips@vger.kernel.org, Oliver Upton , Palmer Dabbelt , kvm-riscv@lists.infradead.org, Paolo Bonzini , Vitaly Kuznetsov , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Nov 3, 2022 at 4:49 AM Sean Christopherson wrote: > > Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of > bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a > glorified nop as invoking kvm_arch_init() is the very first action > performed by kvm_init(). > > Moving setup to riscv_kvm_init(), which is tagged __init, will allow > tagging more functions and data with __init and __ro_after_init. And > emptying kvm_arch_init() will allow dropping the hook entirely once all > architecture implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/main.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c > index a146fa0ce4d2..cb063b8a9a0f 100644 > --- a/arch/riscv/kvm/main.c > +++ b/arch/riscv/kvm/main.c > @@ -66,6 +66,15 @@ void kvm_arch_hardware_disable(void) > } > > int kvm_arch_init(void *opaque) > +{ > + return 0; > +} > + > +void kvm_arch_exit(void) > +{ > +} > + > +static int __init riscv_kvm_init(void) > { > const char *str; > > @@ -110,15 +119,6 @@ int kvm_arch_init(void *opaque) > > kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits()); > > - return 0; > -} > - > -void kvm_arch_exit(void) > -{ > -} > - > -static int __init riscv_kvm_init(void) > -{ > return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > } > module_init(riscv_kvm_init); > -- > 2.38.1.431.g37b22c650d-goog > 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 F2204C433FE for ; Mon, 7 Nov 2022 03:06:23 +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:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xsI2V8F7ZedQSUUe7VJyS83GG1F5u4eyoWVL0btrBUg=; b=hjuqaaMCT8Vrw/ zwhQv+btSxQjmLvhnyN0Bt4jzGQgMHROr+3FKgxiv/9zsN26sLFs12m6vi+fDm9cZCwqY4CPZpDus RNJ+2TP+p26GXizB3AcQLbpzSO0U8nRt2CyXiGEQH7d2wEkXnuIlA51dxk9OY/pbmNh1up+MZgqO+ to1CyWenRlEyPCXwHib/DoC4q2yF+dVkVOOiXPT4sbj+zmKwRabU7zXavUTP7YKA0Cf8P7Z0ZmJuy QITbr8uWRZZbTXGoWvOleAHE70fTUwTqwl+wiAvIx+cF19bXArC0uAZPkS12J6toP+n/Guf/V/Eb3 lmcc+pyuFy80x91gZNnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1orsRs-00BDv6-2N; Mon, 07 Nov 2022 03:05:20 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1orsRo-00BDtp-Va for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 03:05:18 +0000 Received: by mail-ej1-x636.google.com with SMTP id bj12so26616651ejb.13 for ; Sun, 06 Nov 2022 19:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=O2GdYT7cMyZAwXXzVaGGer2516sCwb8nVa+3zH1uKyisQxoW9HAvhvHCOOJeufiTbl F3Np7E0Q60MoiXXzv7QKKfVpPuct8EOqbYhrz0wkX1SdRI+8oB73JExLBlUhlEORndI0 oR5Ci6Q9Zji0dGkOeDy61S11yj8qgzFtdaxDEMNt1vXTTwBDofXJXEd/zzO2opd/NDJm j1f/gZ4KRV3uPIBqcQXujsk4akPpTe+2a2n4m0j+UpZ//j9kycunMnHpdO3L/Ji7eqnQ U523Q+8cijpVSXguZZnGJMRJTHTEr5k6EgUTEZqzTJSespExVQpXPGZ+H7/pFHIEuIGk PlTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YDkpvmLdCcNS/SK5D2IL8ltTmU7MAjuwj9on9XdxjqM=; b=5WDeCLylKAu023suX0xLvz+C3j0S+xJysNqebJmiSG2odOmdOCxKBrP3CSAMQ6hAvV fjldlwRr1WFlIhBRkqxYGse0ynBMhgVgmz1ZAAF3UQOOKtdfTaC3Bri9vtEpCKwIKI1m zMMJZNj2t80oZkdGj27y00HUCW9u/JYxXkICZx0o7fcGQurskmnsj6cCgN7GdJmMX+W1 3ZXcXKHrLZw3nlvo8IVjULxbzaOduOFM2rygw0KYXNABhdOWEGTneoFcx5XSS37de6p3 ayNwumdRNlHnS782m1IfDKs65/8ltH7MwZsBGZ7S4VK0lUiH7XzcZgLjE/ouMisxK87/ EP0w== X-Gm-Message-State: ACrzQf3j43V4RncFQfCeaZCXuBxrqvl4nh5hTvJrCa+xAsbemKICI88G Sf8Sg0yWdr7kijeu6O01L3mk5gS6oAOph1VrnjIzlQ== X-Google-Smtp-Source: AMsMyM525hQagKYMIlOIdqQEy/Sx/ht089FGqr8YQw810BAnhG6hulq/sfu3BFpHCBMEkVy5m+xwSwFEwA0SvamrVJs= X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr46182007ejb.230.1667790314965; Sun, 06 Nov 2022 19:05:14 -0800 (PST) MIME-Version: 1.0 References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-23-seanjc@google.com> In-Reply-To: <20221102231911.3107438-23-seanjc@google.com> From: Anup Patel Date: Mon, 7 Nov 2022 08:35:03 +0530 Message-ID: Subject: Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Isaku Yamahata , Fabiano Rosas , Michael Ellerman , Chao Gao , Thomas Gleixner , Yuan Yao X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221106_190517_037050_D15B66B5 X-CRM114-Status: GOOD ( 17.12 ) 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 Thu, Nov 3, 2022 at 4:49 AM Sean Christopherson wrote: > > Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of > bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a > glorified nop as invoking kvm_arch_init() is the very first action > performed by kvm_init(). > > Moving setup to riscv_kvm_init(), which is tagged __init, will allow > tagging more functions and data with __init and __ro_after_init. And > emptying kvm_arch_init() will allow dropping the hook entirely once all > architecture implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/main.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c > index a146fa0ce4d2..cb063b8a9a0f 100644 > --- a/arch/riscv/kvm/main.c > +++ b/arch/riscv/kvm/main.c > @@ -66,6 +66,15 @@ void kvm_arch_hardware_disable(void) > } > > int kvm_arch_init(void *opaque) > +{ > + return 0; > +} > + > +void kvm_arch_exit(void) > +{ > +} > + > +static int __init riscv_kvm_init(void) > { > const char *str; > > @@ -110,15 +119,6 @@ int kvm_arch_init(void *opaque) > > kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits()); > > - return 0; > -} > - > -void kvm_arch_exit(void) > -{ > -} > - > -static int __init riscv_kvm_init(void) > -{ > return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > } > module_init(riscv_kvm_init); > -- > 2.38.1.431.g37b22c650d-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel