aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-10-17 21:41:34 +0100
committerPeter Maydell <peter.maydell@linaro.org>2012-10-17 21:55:06 +0100
commitbdd7f9c38e93426c9a50d13856998df30f2b41dd (patch)
tree362b58d68436b4dec40929415b77b6484642dc29
parent05ed95db4a9eee2fe2db71e4d8c5a4cb073e2423 (diff)
downloadqemu-arm-bdd7f9c38e93426c9a50d13856998df30f2b41dd.tar.gz
linux-headers: add new definitions for irqchip init
This is from Christoffer's RFC patches.
-rw-r--r--linux-headers/asm-arm/kvm.h13
-rw-r--r--linux-headers/linux/kvm.h11
2 files changed, 24 insertions, 0 deletions
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
index b6eaf0cf2c..dfd60ccd81 100644
--- a/linux-headers/asm-arm/kvm.h
+++ b/linux-headers/asm-arm/kvm.h
@@ -42,6 +42,19 @@ struct kvm_regs {
#define KVM_ARM_TARGET_CORTEX_A15 0
#define KVM_ARM_NUM_TARGETS 1
+/* KVM_SET_DEVICE_ADDRESS ioctl id encoding */
+#define KVM_DEVICE_TYPE_SHIFT 0
+#define KVM_DEVICE_TYPE_MASK (0xffff << KVM_DEVICE_TYPE_SHIFT)
+#define KVM_DEVICE_ID_SHIFT 16
+#define KVM_DEVICE_ID_MASK (0xffff << KVM_DEVICE_ID_SHIFT)
+
+/* Supported device IDs */
+#define KVM_ARM_DEVICE_VGIC_V2 0
+
+/* Supported VGIC address types */
+#define KVM_VGIC_V2_ADDR_TYPE_DIST 0
+#define KVM_VGIC_V2_ADDR_TYPE_CPU 1
+
struct kvm_vcpu_init {
__u32 target;
__u32 features[7];
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 7a02d73224..18e1c78db9 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -626,6 +626,8 @@ struct kvm_ppc_smmu_info {
#ifdef __KVM_HAVE_READONLY_MEM
#define KVM_CAP_READONLY_MEM 81
#endif
+#define KVM_CAP_INIT_IRQCHIP 82
+#define KVM_CAP_SET_DEVICE_ADDR 83
#ifdef KVM_CAP_IRQ_ROUTING
@@ -759,6 +761,11 @@ struct kvm_msi {
__u8 pad[16];
};
+struct kvm_device_address {
+ __u32 id;
+ __u64 addr;
+};
+
/*
* ioctls for VM fds
*/
@@ -839,6 +846,10 @@ struct kvm_s390_ucas_mapping {
#define KVM_PPC_GET_SMMU_INFO _IOR(KVMIO, 0xa6, struct kvm_ppc_smmu_info)
/* Available with KVM_CAP_PPC_ALLOC_HTAB */
#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
+/* Available with KVM_CAP_INIT_IRQCHIP */
+#define KVM_INIT_IRQCHIP _IO(KVMIO, 0xa8)
+/* Available with KVM_CAP_SET_DEVICE_ADDR */
+#define KVM_SET_DEVICE_ADDRESS _IOW(KVMIO, 0xa9, struct kvm_device_address)
/*
* ioctls for vcpu fds