[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v4 2/6] target-arm: move gicv3_class_name from machine
From: |
Eric Auger |
Subject: |
[Qemu-devel] [RFC v4 2/6] target-arm: move gicv3_class_name from machine to kvm_arm.h |
Date: |
Wed, 6 Jul 2016 11:46:00 +0200 |
Machine.c contains code related to migration. Let's move
gicv3_class_name to kvm_arm.h instead.
Signed-off-by: Eric Auger <address@hidden>
Suggested-by: Peter Maydell <address@hidden>
---
v4: creation
---
target-arm/kvm_arm.h | 16 +++++++++++++++-
target-arm/machine.c | 16 ----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
index 544e404..4fb6d15 100644
--- a/target-arm/kvm_arm.h
+++ b/target-arm/kvm_arm.h
@@ -223,7 +223,21 @@ static inline const char *gic_class_name(void)
*
* Returns: class name to use
*/
-const char *gicv3_class_name(void);
+static inline const char *gicv3_class_name(void)
+{
+ if (kvm_irqchip_in_kernel()) {
+#ifdef TARGET_AARCH64
+ return "kvm-arm-gicv3";
+#else
+ error_report("KVM GICv3 acceleration is not supported on this "
+ "platform");
+#endif
+ } else {
+ return "arm-gicv3";
+ }
+
+ exit(1);
+}
/**
* kvm_arm_handle_debug:
diff --git a/target-arm/machine.c b/target-arm/machine.c
index 2dbeb82..d90943b 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -331,19 +331,3 @@ const VMStateDescription vmstate_arm_cpu = {
NULL
}
};
-
-const char *gicv3_class_name(void)
-{
- if (kvm_irqchip_in_kernel()) {
-#ifdef TARGET_AARCH64
- return "kvm-arm-gicv3";
-#else
- error_report("KVM GICv3 acceleration is not supported on this "
- "platform");
-#endif
- } else {
- return "arm-gicv3";
- }
-
- exit(1);
-}
--
2.5.5