From patchwork Thu May 19 11:17:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9126591 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6D56ABF29F for ; Thu, 19 May 2016 11:28:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C05152024C for ; Thu, 19 May 2016 11:28:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F34420225 for ; Thu, 19 May 2016 11:28:09 +0000 (UTC) Received: from localhost ([::1]:49729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3M7c-0003vr-ES for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 May 2016 07:28:08 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=e9ljrKKcxm0vpGJliBe5dkTqLOftkI3++0RRKf/TNAI=; b=k9b8d22YUucrsvfUr7SIyN2hVI54Luuy7U/yFZqBJ+XbP2K0CTF55fPobEiNXoRIOz PUhNSgc1k6N5YD2zE32SePILPJkqXyaojP0fgEWI1M5Ij+78Lr2WBo9EIUUoUciLeywN Du7/oFztR8MGWsmLT/tuejxHL+kMLXsbqTOhMQw+IYKHUbiXrCEjXX22WvvpXLlx0ki6 mwNcmuCR+97ZcGt7Q8Qg9CR+qwKWnkrntg8Tx8pEL8LPmu5lPRkSpXnVfLbiVOT/G4Vf VLfXS7esKIiQAO3qqjirzNKwyLW9e3hVZOGY+tCWOqn4qqD48vJbS6Y7dJA/+7T77kgB 8GUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=e9ljrKKcxm0vpGJliBe5dkTqLOftkI3++0RRKf/TNAI=; b=KNSwgdg7ySiCGXvCY7BOgRXYLpeRPFks147oP82q1bCFCy3d0iz8l0TXYO9fqm0Som SAZdfBDoCG7VehQMtG9Ohunm5MnE45lt5YY467RwoqcGwOFBSliKm4clvxgKxwsog3TY eyoqzcVYOVfpCWGdLE2SbA1rQtuR223RISnrVz3xt3k3o7xMqKksVT9Ko/2f36TUXPxv 3Jsg2pskBfW8VMu9BHzHgAhrabF1dfqtMSmktK9TTVbhDTvtJHg/Qst5qw8oblYuWXx7 tHMzdPKi7178cz5SlCnfn1S2BmVqoAzYR3rcFG+cgWtZM61ErRJtLxPOKnKNPlRzZ+2a vMTQ== X-Gm-Message-State: AOPr4FVRohO6zkVBiKUcDNFehOfalEzzaB73LErQN5jVJDRRGd4OGIysQ0ug7IQOyVd7vA== X-Received: by 10.194.32.165 with SMTP id k5mr13868023wji.23.1463656731618; Thu, 19 May 2016 04:18:51 -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) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 13:17:56 +0200 Message-Id: <1463656726-35952-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> References: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 02/52] s390x: move .needed functions for subsections to machine.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,