diff mbox

[02/52] s390x: move vregs_needed to machine.c

Message ID 1463589381-66853-3-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini May 18, 2016, 4:36 p.m. UTC
It is only needed in one file, move it there.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-s390x/cpu.h     | 15 ---------------
 target-s390x/machine.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 15 deletions(-)

Comments

Cornelia Huck May 18, 2016, 4:52 p.m. UTC | #1
On Wed, 18 May 2016 18:36:15 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> It is only needed in one file, move it there.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  target-s390x/cpu.h     | 15 ---------------
>  target-s390x/machine.c | 10 ++++++++++
>  2 files changed, 10 insertions(+), 15 deletions(-)

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
diff mbox

Patch

diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 6d97c08..62c24d1 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -1264,21 +1264,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;
-}
-#else
-static inline bool vregs_needed(void *opaque)
-{
-    return 0;
-}
-#endif
-
 /* machine check interruption code */
 
 /* subclasses */
diff --git a/target-s390x/machine.c b/target-s390x/machine.c
index 6b26090..d2b52b2 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,