From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Lyn-00044F-CH for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3Lye-00041h-Aq for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:01 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:36473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Lye-00041c-3f for qemu-devel@nongnu.org; Thu, 19 May 2016 07:18:52 -0400 Received: by mail-wm0-x241.google.com with SMTP id w143so20024043wmw.3 for ; Thu, 19 May 2016 04:18:52 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id c7sm8374317wji.38.2016.05.19.04.18.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 04:18:50 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 19 May 2016 13:17:56 +0200 Message-Id: <1463656726-35952-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> References: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 02/52] s390x: move .needed functions for subsections to machine.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org These functions are only used when defining subsections, so move them there. Acked-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- target-s390x/cpu.h | 26 -------------------------- target-s390x/machine.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 996b790..00e9f69 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -1271,32 +1271,6 @@ static inline void s390_crypto_reset(void) } } -#ifdef CONFIG_KVM -static inline bool vregs_needed(void *opaque) -{ - if (kvm_enabled()) { - return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS); - } - return 0; -} -static inline bool riccb_needed(void *opaque) -{ - if (kvm_enabled()) { - return kvm_s390_get_ri(); - } - return 0; -} -#else -static inline bool vregs_needed(void *opaque) -{ - return 0; -} -static inline bool riccb_needed(void *opaque) -{ - return 0; -} -#endif - /* machine check interruption code */ /* subclasses */ diff --git a/target-s390x/machine.c b/target-s390x/machine.c index a30b16f..aa39e5d 100644 --- a/target-s390x/machine.c +++ b/target-s390x/machine.c @@ -76,6 +76,16 @@ static const VMStateDescription vmstate_fpu = { } }; +static bool vregs_needed(void *opaque) +{ +#ifdef CONFIG_KVM + if (kvm_enabled()) { + return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS); + } +#endif + return 0; +} + static const VMStateDescription vmstate_vregs = { .name = "cpu/vregs", .version_id = 1, @@ -135,6 +145,16 @@ static const VMStateDescription vmstate_vregs = { } }; +static bool riccb_needed(void *opaque) +{ +#ifdef CONFIG_KVM + if (kvm_enabled()) { + return kvm_s390_get_ri(); + } +#endif + return 0; +} + const VMStateDescription vmstate_riccb = { .name = "cpu/riccb", .version_id = 1, -- 1.8.3.1