Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3680346ybb; Mon, 23 Mar 2020 05:48:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsLOWsAgm3Dt0cjqohqqACdX/ll76N4JrT2vATm4+4VRp//IkJcgic3JveTbehwU/M2j6Nd X-Received: by 2002:a4a:3b50:: with SMTP id s77mr306255oos.53.1584967708652; Mon, 23 Mar 2020 05:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584967708; cv=none; d=google.com; s=arc-20160816; b=zGhjL7fNRzgGgFTUWbtIUl/kCrVsy5yhuaHjZq4hTorK/tfYtVGj2yL1b7mHRqhJTq NaVuSHC2O6p6F/V1rxCrYqrklL+Q3kT76nEt6W90sdeX+hMJavyVeDuzbfVf4xIOtkHq qfuZ+4cL2teZT2irTPpvK8Xi6WXPm0+pi8HKGwhfRd6meCZWShRbnYS0WNEnUTrYLbG9 TQZcvt+DL0VmE/JbAkgS2mF70mwcLebfHgY8KTv8SHzfPGQ7Px2VtTsW935Pg54gDchO l514zFD7mGcBxLDug3/uaHWw3YuUVlK8w7VjZZYnf4kIY4X1+yyGePggjCS2ySzzGAOW U0Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=7ey+1F39M8ByNAstuPtE4DBKq3YafypzQysKAMbXteM=; b=jpumqv0ZIbj0LUPGBKB5srA7xNEM3M/znZV02CT98OxGOw4FuznQswNSSgM8/lNTjX axd+cmNQg8m6nTLdFHRu1g2GhezLVCtRqyw2RkmWKi0ALqaDseXzgNywkru7w+DHuCXM WnfbT8ZU6arYj/fjhPd6J4GS0YjPgdAtv91FhWsaS6szk0y8w/tVbR5O+Xn+wVMipXGl f9qS+QjrwK9Ond33FKVwQKXu7btptVpI+bycBEdDJrcFaItTC9IgSNt619MYo6HWvPHI W97An+uNaVEvYdQx/TnfkeHl5h0K82cIOOhAGMtlh0AfeQ9xF2MZOSQGyRE0v4O/Ccit Qfiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J4ST1exS; 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=pass (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 h27si191857oos.21.2020.03.23.05.48.16; Mon, 23 Mar 2020 05:48:28 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J4ST1exS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728289AbgCWMq3 (ORCPT + 99 others); Mon, 23 Mar 2020 08:46:29 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:49739 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728264AbgCWMq2 (ORCPT ); Mon, 23 Mar 2020 08:46:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584967587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7ey+1F39M8ByNAstuPtE4DBKq3YafypzQysKAMbXteM=; b=J4ST1exSSOIyiByhCcSn+VhGk56MHD9Ep9qjzCSUopWFN4KYmhf94hR4I790NSXUFy4nYA l3muuKl7nWjm5nAA5CyRx9uG3atR9ABbo0E5xPOm6mR9Uglf49UESE4BYAA7Gt0aJK6ch5 m47N/wxo7iIVx5CIH49drJZjFzNa4oY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-70-m5iPTMzINGGaMSpGR13c2w-1; Mon, 23 Mar 2020 08:46:26 -0400 X-MC-Unique: m5iPTMzINGGaMSpGR13c2w-1 Received: by mail-wm1-f69.google.com with SMTP id y1so1986985wmj.3 for ; Mon, 23 Mar 2020 05:46:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=7ey+1F39M8ByNAstuPtE4DBKq3YafypzQysKAMbXteM=; b=bL2QqVQVzruyCXJ/uEgzvpqD+jyPp+Fiva4APyoQFkIPCbf9kN+t68K55Rd+hPpPs0 hgn8Udhi1TLpXgufpS9syxg9OWW+DND8J/vhFrqT6eRUJuZfqqDNXvfte1KrIb6S2V9h uuMpnhWvAJAMPUOaA0A8ivjExPlR0kREadTP8zG8cxoxHEsVAIiQrVbxKW8KC9OyJMdk mnGC5Fmmn4dSbJt8Ww6rDYBmCrEbXn/gt4ADE6+KevzF3p8slrHZouDYgb0/xcjEfplS QH3CVa+Uq+MMODoe+FCVzPsnhYtdH5CwVdg/vCNjgzUk9Ys0k+zl9ycmlf7H4FtQgwoo CSMw== X-Gm-Message-State: ANhLgQ18/seTBvIET8u7LfZ8qlTJsuxgyVimZzbZOWB4mFsym8tkttPv TMvdX0mScjUoliwgHkizBvsxYHOjq5NBpr/EQL17mp1pxjP147b1JesLH8YQXmsDskRE1PYLLyC hByiW7cNjS8f3FN7zb+gtsb6h X-Received: by 2002:a1c:6745:: with SMTP id b66mr27121461wmc.30.1584967584693; Mon, 23 Mar 2020 05:46:24 -0700 (PDT) X-Received: by 2002:a1c:6745:: with SMTP id b66mr27121425wmc.30.1584967584395; Mon, 23 Mar 2020 05:46:24 -0700 (PDT) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id f15sm23749313wru.83.2020.03.23.05.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 05:46:23 -0700 (PDT) From: Vitaly Kuznetsov To: Sean Christopherson , Paolo Bonzini Cc: Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Sean Christopherson , Wanpeng Li , Jim Mattson , Joerg Roedel , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 7/9] KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup() In-Reply-To: <20200321202603.19355-8-sean.j.christopherson@intel.com> References: <20200321202603.19355-1-sean.j.christopherson@intel.com> <20200321202603.19355-8-sean.j.christopherson@intel.com> Date: Mon, 23 Mar 2020 13:46:22 +0100 Message-ID: <87a7479r35.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sean Christopherson writes: > Remove the __exit annotation from VMX hardware_unsetup(), the hook > can be reached during kvm_init() by way of kvm_arch_hardware_unsetup() > if failure occurs at various points during initialization. > > Note, there is no known functional issue with the __exit annotation, the > above is merely justification for its removal. The real motivation is > to be able to annotate vmx_x86_ops and svm_x86_ops with __initdata, > which makes objtool complain because objtool doesn't understand that the > vendor specific __initdata is being copied by value to a non-__initdata > instance. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm_host.h | 2 +- > arch/x86/kvm/vmx/vmx.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 54f991244fae..42a2d0d3984a 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1056,7 +1056,7 @@ static inline u16 kvm_lapic_irq_dest_mode(bool dest_mode_logical) > struct kvm_x86_ops { > int (*hardware_enable)(void); > void (*hardware_disable)(void); > - void (*hardware_unsetup)(void); /* __exit */ > + void (*hardware_unsetup)(void); > bool (*cpu_has_accelerated_tpr)(void); > bool (*has_emulated_msr)(int index); > void (*cpuid_update)(struct kvm_vcpu *vcpu); > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index 4bbe0d165a0c..fac22e316417 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7652,7 +7652,7 @@ static bool vmx_apic_init_signal_blocked(struct kvm_vcpu *vcpu) > return to_vmx(vcpu)->nested.vmxon; > } > > -static __exit void hardware_unsetup(void) > +static void hardware_unsetup(void) > { > if (nested) > nested_vmx_hardware_unsetup(); Reviewed-by: Vitaly Kuznetsov -- Vitaly