From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 3/7] kvm: Move kvm_spurious_fault dec out of x86 Date: Fri, 05 Apr 2013 09:56:17 +0200 Message-ID: <515E83A1.6010208@redhat.com> References: <395f9961a11debede220990c020e5d011cdf40b1.1365117838.git.geoff@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu To: Geoff Levand Return-path: Received: from mail-wi0-f171.google.com ([209.85.212.171]:38442 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754855Ab3DEH4Z (ORCPT ); Fri, 5 Apr 2013 03:56:25 -0400 Received: by mail-wi0-f171.google.com with SMTP id hn17so304224wib.4 for ; Fri, 05 Apr 2013 00:56:24 -0700 (PDT) In-Reply-To: <395f9961a11debede220990c020e5d011cdf40b1.1365117838.git.geoff@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: Il 05/04/2013 01:33, Geoff Levand ha scritto: > The routine kvm_spurious_fault() is a common kvm routine, so > move its declaration from arch/x86/include/asm/kvm_host.h to > arch/arm/include/asm/kvm_host.h. > > Fixes sparse warning when building on arm64: > > virt/kvm/kvm_main.c:warning: symbol 'kvm_spurious_fault' was not declared. Should it be static? Please move it to arch/x86/kvm/x86.c instead. Thanks! Paolo > Signed-off-by: Geoff Levand > --- > arch/x86/include/asm/kvm_host.h | 6 ------ > include/linux/kvm_host.h | 7 +++++++ > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 40fc39f..da7c126 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -964,12 +964,6 @@ enum { > #define HF_IRET_MASK (1 << 4) > #define HF_GUEST_MASK (1 << 5) /* VCPU is in guest-mode */ > > -/* > - * Hardware virtualization extension instructions may fault if a > - * reboot turns off virtualization while processes are running. > - * Trap the fault and ignore the instruction if that happens. > - */ > -asmlinkage void kvm_spurious_fault(void); > extern bool kvm_rebooting; > > #define ____kvm_handle_fault_on_reboot(insn, cleanup_insn) \ > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 8ef2212..4bfb062 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1031,6 +1031,13 @@ static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu) > } > } > > +/* > + * Hardware virtualization extension instructions may fault if a > + * reboot turns off virtualization while processes are running. > + * Trap the fault and ignore the instruction if that happens. > + */ > +asmlinkage void kvm_spurious_fault(void); > + > #ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT > > static inline void kvm_vcpu_set_in_spin_loop(struct kvm_vcpu *vcpu, bool val) >