[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 3/8] target-arm: move gicv3_class_name from machi
From: |
Eric Auger |
Subject: |
[Qemu-devel] [PATCH v7 3/8] target-arm: move gicv3_class_name from machine to kvm_arm.h |
Date: |
Fri, 23 Sep 2016 09:43:32 +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>
Reviewed-by: Peter Maydell <address@hidden>
---
v5 -> v6:
- add Peter's R-b
v4 -> v5:
- add #include "qemu/error-report.h"
- rebased on target-arm: Fix unreachable code in gicv3_class_name()
v4: creation
Conflicts:
target-arm/machine.c
---
target-arm/kvm_arm.h | 16 +++++++++++++++-
target-arm/machine.c | 15 ---------------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
index 544e404..633d088 100644
--- a/target-arm/kvm_arm.h
+++ b/target-arm/kvm_arm.h
@@ -13,6 +13,7 @@
#include "sysemu/kvm.h"
#include "exec/memory.h"
+#include "qemu/error-report.h"
/**
* kvm_arm_vcpu_init:
@@ -223,7 +224,20 @@ 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");
+ exit(1);
+#endif
+ } else {
+ return "arm-gicv3";
+ }
+}
/**
* kvm_arm_handle_debug:
diff --git a/target-arm/machine.c b/target-arm/machine.c
index 7a6ca31..d90943b 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -331,18 +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");
- exit(1);
-#endif
- } else {
- return "arm-gicv3";
- }
-}
--
2.5.5
- [Qemu-devel] [PATCH v7 0/8] vITS support, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 1/8] hw/intc/arm_gic(v3)_kvm: Initialize gsi routing, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 2/8] hw/intc/arm_gicv3_its: Implement ITS base class, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 3/8] target-arm: move gicv3_class_name from machine to kvm_arm.h,
Eric Auger <=
- [Qemu-devel] [PATCH v7 4/8] kvm-all: Pass requester ID to MSI routing functions, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 5/8] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 7/8] ACPI: Add GIC Interrupt Translation Service Structure definition, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 6/8] arm/virt: Add ITS to the virt board, Eric Auger, 2016/09/23
- [Qemu-devel] [PATCH v7 8/8] ARM: Virt: ACPI: Add GIC ITS description in ACPI MADT table, Eric Auger, 2016/09/23
- Re: [Qemu-devel] [PATCH v7 0/8] vITS support, Peter Maydell, 2016/09/29