Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp583891ybx; Tue, 5 Nov 2019 02:17:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyurY27KJTlYUlKSJfVmgfUj5MKWZ3a//ht69xeY7RzcFdpwo+p4OA/zaWW8F98xzEi9xR9 X-Received: by 2002:a17:906:1cc3:: with SMTP id i3mr27900648ejh.81.1572949070590; Tue, 05 Nov 2019 02:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572949070; cv=none; d=google.com; s=arc-20160816; b=yo79m0HoEGjOvEpb/qxQy6LeRERLlc+gNqCYS6peGvEYb+TJWxqGRP+q9hOHobfhvA 3NXhuJBNMy1mT/6hQSRRV7SEpdY3aHbaemiFY87Lwxly3DHkxAJQltyc7Cw7nj6b2JPL 9EH9VVr1iuVjflZ+JnOsrXYue0jZk//fyXXZxeA0LVI2l8JtyDWn0ngHvDD/Dlvyri5E CeQ7Nd9JAbQEIC/jMMteFYjL23oCuFd1P6leKETO4CqKQm0NsjzGuAfAEO1xIVoef5de 9/LGGccHWERJtiLkbh26kxXus8fM/HSMpLahKjaAJOOVm5FVrVBxulTs/oFsAYlyhgtR Wd6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=Ct8tCrODlfwykP6VQq2exRkG1sdhY/k8AxLcXtCzuNM=; b=yTMTha81F4rAEgU+wDXASEZnPdK0uuRVghcUZ+lrxyCGWpQqk3DifajOtm+Ei49CYe jZUnoXtlIPJ70R6JDCrGLwPpS06zQ/yO4KL4F1OPudZsSzbFHTFg+cAqP6Bl55HHSZDE Yo8pDZ48+l84aeJCsavtQoG7v03GjKyiYBwhw/Ij8PD9MabNxSPhMvrMyXPg2zrvzj6b /gg8BYIPbEW3W1UiSJ0t436ZSOYmVIpF4yj7O7q2V2ozamsADF2P/y5KznsSmaDk8+pk QKlnfHPpcqSQOC0tx/8i51BN6SVBEul22/VSxmxN0ha4TmduV7oCW/bpS5DpMu1jBaZu 6+Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si13014682ejb.116.2019.11.05.02.17.27; Tue, 05 Nov 2019 02:17:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388398AbfKEKQS (ORCPT + 99 others); Tue, 5 Nov 2019 05:16:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388197AbfKEKQR (ORCPT ); Tue, 5 Nov 2019 05:16:17 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE31C2D0FD1 for ; Tue, 5 Nov 2019 10:16:16 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id f16so11728639wrr.16 for ; Tue, 05 Nov 2019 02:16:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ct8tCrODlfwykP6VQq2exRkG1sdhY/k8AxLcXtCzuNM=; b=Tk+eUhJtdLy1uIA8VeFozQOFD+Hp9Cvs2p9rRrcj0Z+tiJ72RvgDbcTxcnwfJlxjk1 qeZNUxQnfL5zPJp+LEbVZM5i0DtWYgz5bjx1YxPi+RTVcrmtaymcNtuYvgC6t2E7Qrgm +/WmfKhUehvthtxZ/qLs8QqjAuob7ADwDfaTxRukoHyxMPlS052qYiGFOgqyOyXZHUxN WsQBSahDEKqJXPotTkaX9ILJLjRuvsvnwqWc1C3FinaELhI3IyS0SxqfxWh0w/GFT7a6 SfJF99MPI0MaIDqSZWmtCOiX6bGqyTFh6N48y1EmpIbN/YLr3zKjjur4srgYYCDgc6Jn f0wQ== X-Gm-Message-State: APjAAAXENQveLtJz7aG1368ii0S+Vp1IcmIETHeCo4d5x4m7nVyBXPA4 EsoI47DZhbfMrNrkrvHjtsYusNO63v/5tTucWdAcdwJ7HUzKYj4sIM1vdrQRnNQcC5QcOnM/NKc nK2/Rw/Yytsplb/8HTcerbWfe X-Received: by 2002:adf:f7d1:: with SMTP id a17mr26340168wrq.111.1572948975207; Tue, 05 Nov 2019 02:16:15 -0800 (PST) X-Received: by 2002:adf:f7d1:: with SMTP id a17mr26340145wrq.111.1572948974888; Tue, 05 Nov 2019 02:16:14 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:4051:461:136e:3f74? ([2001:b07:6468:f312:4051:461:136e:3f74]) by smtp.gmail.com with ESMTPSA id 65sm31147840wrs.9.2019.11.05.02.16.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Nov 2019 02:16:14 -0800 (PST) Subject: Re: [PATCH 05/13] KVM: monolithic: add more section prefixes To: Andrea Arcangeli , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vitaly Kuznetsov , Sean Christopherson References: <20191104230001.27774-1-aarcange@redhat.com> <20191104230001.27774-6-aarcange@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <62961d8f-39b9-86e2-59b8-b64b77022939@redhat.com> Date: Tue, 5 Nov 2019 11:16:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191104230001.27774-6-aarcange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/11/19 23:59, Andrea Arcangeli wrote: > Add more section prefixes because with the monolithic KVM model the > section checker can now do a more accurate static analysis at build > time and this allows to build without > CONFIG_SECTION_MISMATCH_WARN_ONLY=n. > > Signed-off-by: Andrea Arcangeli > --- > arch/powerpc/kvm/book3s.c | 2 +- > arch/x86/kvm/x86.c | 4 ++-- > include/linux/kvm_host.h | 8 ++++---- > virt/kvm/arm/arm.c | 2 +- > virt/kvm/kvm_main.c | 6 +++--- > 5 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c > index ec2547cc5ecb..e80e9504722a 100644 > --- a/arch/powerpc/kvm/book3s.c > +++ b/arch/powerpc/kvm/book3s.c > @@ -1067,7 +1067,7 @@ int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin) > > #endif /* CONFIG_KVM_XICS */ > > -static int kvmppc_book3s_init(void) > +static __init int kvmppc_book3s_init(void) > { > int r; > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index fb963e6b2e54..5e98fa6b7bf8 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9272,7 +9272,7 @@ void kvm_arch_hardware_disable(void) > drop_user_return_notifiers(); > } > > -int kvm_arch_hardware_setup(void) > +__init int kvm_arch_hardware_setup(void) > { > int r; > > @@ -9303,7 +9303,7 @@ void kvm_arch_hardware_unsetup(void) > kvm_x86_hardware_unsetup(); > } > > -int kvm_arch_check_processor_compat(void) > +__init int kvm_arch_check_processor_compat(void) > { > return kvm_x86_check_processor_compatibility(); > } > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 719fc3e15ea4..426bc2f485a9 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -616,8 +616,8 @@ static inline void kvm_irqfd_exit(void) > { > } > #endif > -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, > - struct module *module); > +__init int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, > + struct module *module); > void kvm_exit(void); > > void kvm_get_kvm(struct kvm *kvm); > @@ -867,9 +867,9 @@ void kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu); > > int kvm_arch_hardware_enable(void); > void kvm_arch_hardware_disable(void); > -int kvm_arch_hardware_setup(void); > +__init int kvm_arch_hardware_setup(void); > void kvm_arch_hardware_unsetup(void); > -int kvm_arch_check_processor_compat(void); > +__init int kvm_arch_check_processor_compat(void); > int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu); > bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu); > int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu); > diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c > index 86c6aa1cb58e..65f7f0f6868d 100644 > --- a/virt/kvm/arm/arm.c > +++ b/virt/kvm/arm/arm.c > @@ -1726,7 +1726,7 @@ void kvm_arch_exit(void) > kvm_perf_teardown(); > } > > -static int arm_init(void) > +static __init int arm_init(void) > { > int rc = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE); > return rc; > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index d6f0696d98ef..1b7fbd138406 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -4246,13 +4246,13 @@ static void kvm_sched_out(struct preempt_notifier *pn, > kvm_arch_vcpu_put(vcpu); > } > > -static void check_processor_compat(void *rtn) > +static __init void check_processor_compat(void *rtn) > { > *(int *)rtn = kvm_arch_check_processor_compat(); > } > > -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, > - struct module *module) > +__init int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, > + struct module *module) > { > int r; > int cpu; > Queued, thanks. Paolo