2017-04-28 13:47:25 +02:00
|
|
|
From bc9b2977224fcea4131448ade1e122c36411435d Mon Sep 17 00:00:00 2001
|
2017-04-12 21:10:15 +02:00
|
|
|
From: Christoffer Dall <cdall@linaro.org>
|
|
|
|
Date: Tue, 28 Mar 2017 16:12:03 +0200
|
|
|
|
Subject: [PATCH] RFC: update Linux headers from irqs-to-user-v3
|
|
|
|
|
|
|
|
Get ioctl number and definitions for KVM_CAP_ARM_USER_IRQ.
|
|
|
|
|
|
|
|
Signed-off-by: Christoffer Dall <cdall@linaro.org>
|
|
|
|
[agraf: change cap to indicate downstream status]
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
|
|
---
|
|
|
|
linux-headers/asm-arm/kvm.h | 2 ++
|
|
|
|
linux-headers/asm-arm64/kvm.h | 2 ++
|
|
|
|
linux-headers/linux/kvm.h | 8 ++++++++
|
|
|
|
3 files changed, 12 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
|
2017-05-05 17:05:43 +02:00
|
|
|
index 1101d55d2f..8a1654a55b 100644
|
2017-04-12 21:10:15 +02:00
|
|
|
--- a/linux-headers/asm-arm/kvm.h
|
|
|
|
+++ b/linux-headers/asm-arm/kvm.h
|
|
|
|
@@ -114,6 +114,8 @@ struct kvm_debug_exit_arch {
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kvm_sync_regs {
|
|
|
|
+ /* Used with KVM_CAP_ARM_USER_IRQ */
|
|
|
|
+ __u64 device_irq_level;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kvm_arch_memory_slot {
|
|
|
|
diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h
|
2017-05-05 17:05:43 +02:00
|
|
|
index 651ec30040..1bc8346f0d 100644
|
2017-04-12 21:10:15 +02:00
|
|
|
--- a/linux-headers/asm-arm64/kvm.h
|
|
|
|
+++ b/linux-headers/asm-arm64/kvm.h
|
|
|
|
@@ -143,6 +143,8 @@ struct kvm_debug_exit_arch {
|
|
|
|
#define KVM_GUESTDBG_USE_HW (1 << 17)
|
|
|
|
|
|
|
|
struct kvm_sync_regs {
|
|
|
|
+ /* Used with KVM_CAP_ARM_USER_IRQ */
|
|
|
|
+ __u64 device_irq_level;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kvm_arch_memory_slot {
|
|
|
|
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
|
2017-05-05 17:05:43 +02:00
|
|
|
index 4e082a81b4..72f0d21103 100644
|
2017-04-12 21:10:15 +02:00
|
|
|
--- a/linux-headers/linux/kvm.h
|
|
|
|
+++ b/linux-headers/linux/kvm.h
|
|
|
|
@@ -883,6 +883,7 @@ struct kvm_ppc_resize_hpt {
|
|
|
|
#define KVM_CAP_PPC_MMU_RADIX 134
|
|
|
|
#define KVM_CAP_PPC_MMU_HASH_V3 135
|
|
|
|
#define KVM_CAP_IMMEDIATE_EXIT 136
|
|
|
|
+#define KVM_CAP_ARM_USER_IRQ (0x1000 | 137)
|
|
|
|
|
|
|
|
#ifdef KVM_CAP_IRQ_ROUTING
|
|
|
|
|
|
|
|
@@ -1354,4 +1355,11 @@ struct kvm_assigned_msix_entry {
|
|
|
|
#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0)
|
|
|
|
#define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1)
|
|
|
|
|
|
|
|
+/* Available with KVM_CAP_ARM_USER_IRQ */
|
|
|
|
+
|
|
|
|
+/* Bits for run->s.regs.device_irq_level */
|
|
|
|
+#define KVM_ARM_DEV_EL1_VTIMER (1 << 0)
|
|
|
|
+#define KVM_ARM_DEV_EL1_PTIMER (1 << 1)
|
|
|
|
+#define KVM_ARM_DEV_PMU (1 << 2)
|
|
|
|
+
|
|
|
|
#endif /* __LINUX_KVM_H */
|