[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/13] target/arm/kvm_arm: copy definitions from kvm headers
From: |
Pierrick Bouvier |
Subject: |
[PATCH 05/13] target/arm/kvm_arm: copy definitions from kvm headers |
Date: |
Mon, 28 Apr 2025 22:00:02 -0700 |
"linux/kvm.h" is not included for code compiled without
COMPILING_PER_TARGET, and headers are different depending architecture
(arm, arm64).
Thus we need to manually expose some definitions that will
be used by target/arm, ensuring they are the same for arm amd aarch64.
As well, we must but prudent to not redefine things if code is already
including linux/kvm.h, thus the #ifndef COMPILING_PER_TARGET guard.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
target/arm/kvm_arm.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index c8ddf8beb2e..eedd081064c 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -16,6 +16,21 @@
#define KVM_ARM_VGIC_V2 (1 << 0)
#define KVM_ARM_VGIC_V3 (1 << 1)
+#ifndef COMPILING_PER_TARGET
+
+/* we copy those definitions from asm-arm and asm-aarch64, as they are the same
+ * for both architectures */
+#define KVM_ARM_IRQ_CPU_IRQ 0
+#define KVM_ARM_IRQ_CPU_FIQ 1
+#define KVM_ARM_IRQ_TYPE_CPU 0
+typedef unsigned int __u32;
+struct kvm_vcpu_init {
+ __u32 target;
+ __u32 features[7];
+};
+
+#endif /* COMPILING_PER_TARGET */
+
/**
* kvm_arm_register_device:
* @mr: memory region for this device
--
2.47.2
[PATCH 10/13] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common, Pierrick Bouvier, 2025/04/29
[PATCH 12/13] target/arm/cpu: compile file twice (user, system) only, Pierrick Bouvier, 2025/04/29
[PATCH 02/13] include/system/hvf: missing vaddr include, Pierrick Bouvier, 2025/04/29