aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-08-08 14:10:40 +0100
committerPeter Maydell <peter.maydell@linaro.org>2012-08-08 14:10:40 +0100
commitf8c35618a3559a92542d00fdc146a80a70e3d4fa (patch)
tree59954d30c62e0dd99ae6ce191e1caef8194fc7c3
parentb00f2d0c295f812a9bc61f74ae8f494055deb14f (diff)
downloadqemu-arm-f8c35618a3559a92542d00fdc146a80a70e3d4fa.tar.gz
linux-headers: Update to KVM ARM headers
This commit updates to the KVM ARM kernel tree commit 5196b1b58c, including the changes to the cp15 access ioctls. It is the result of an update-linux-headers.sh run with the non-ARM changes removed. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--linux-headers/asm-arm/kvm.h50
-rw-r--r--linux-headers/asm-arm/kvm_para.h10
-rw-r--r--linux-headers/asm-generic/kvm_para.h5
-rw-r--r--linux-headers/linux/kvm.h3
4 files changed, 50 insertions, 18 deletions
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
index 38ff1d6c31..d040a2ac97 100644
--- a/linux-headers/asm-arm/kvm.h
+++ b/linux-headers/asm-arm/kvm.h
@@ -1,4 +1,7 @@
/*
+ * Copyright (C) 2012 - Virtual Open Systems and Columbia University
+ * Author: Christoffer Dall <c.dall@virtualopensystems.com>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
@@ -11,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
*/
#ifndef __ARM_KVM_H__
@@ -55,15 +57,14 @@ struct kvm_regs {
__u32 reg15;
__u32 cpsr;
__u32 spsr[5]; /* Banked SPSR, indexed by MODE_ */
- struct {
- __u32 c0_midr;
- __u32 c1_sys;
- __u32 c2_base0;
- __u32 c2_base1;
- __u32 c2_control;
- __u32 c3_dacr;
- } cp15;
+};
+/* Supported Processor Types */
+#define KVM_ARM_TARGET_CORTEX_A15 (0xC0F)
+
+struct kvm_vcpu_init {
+ __u32 target;
+ __u32 features[7];
};
struct kvm_sregs {
@@ -84,4 +85,35 @@ struct kvm_sync_regs {
struct kvm_arch_memory_slot {
};
+/* Based on x86, but we use KVM_GET_VCPU_MSR_INDEX_LIST. */
+struct kvm_msr_entry {
+ __u32 index;
+ __u32 reserved;
+ __u64 data;
+};
+
+/* for KVM_GET_MSRS and KVM_SET_MSRS */
+struct kvm_msrs {
+ __u32 nmsrs; /* number of msrs in entries */
+ __u32 pad;
+
+ struct kvm_msr_entry entries[0];
+};
+
+/* for KVM_VCPU_GET_MSR_INDEX_LIST */
+struct kvm_msr_list {
+ __u32 nmsrs; /* number of msrs in entries */
+ __u32 indices[0];
+};
+
+/* If you need to interpret the index values, here's the key. */
+#define KVM_ARM_MSR_COPROC_MASK 0xFFFF0000
+#define KVM_ARM_MSR_64_BIT_MASK 0x00008000
+#define KVM_ARM_MSR_64_OPC1_MASK 0x000000F0
+#define KVM_ARM_MSR_64_CRM_MASK 0x0000000F
+#define KVM_ARM_MSR_32_CRM_MASK 0x0000000F
+#define KVM_ARM_MSR_32_OPC2_MASK 0x00000070
+#define KVM_ARM_MSR_32_CRN_MASK 0x00000780
+#define KVM_ARM_MSR_32_OPC1_MASK 0x00003800
+
#endif /* __ARM_KVM_H__ */
diff --git a/linux-headers/asm-arm/kvm_para.h b/linux-headers/asm-arm/kvm_para.h
index ac0e5e1239..14fab8f0b9 100644
--- a/linux-headers/asm-arm/kvm_para.h
+++ b/linux-headers/asm-arm/kvm_para.h
@@ -1,9 +1 @@
-#ifndef _ASM_ARM_KVM_PARA_H
-#define _ASM_ARM_KVM_PARA_H
-
-static __inline__ unsigned int kvm_arch_para_features(void)
-{
- return 0;
-}
-
-#endif /* _ASM_ARM_KVM_PARA_H */
+#include <asm-generic/kvm_para.h>
diff --git a/linux-headers/asm-generic/kvm_para.h b/linux-headers/asm-generic/kvm_para.h
new file mode 100644
index 0000000000..63df88bf9d
--- /dev/null
+++ b/linux-headers/asm-generic/kvm_para.h
@@ -0,0 +1,5 @@
+#ifndef _ASM_GENERIC_KVM_PARA_H
+#define _ASM_GENERIC_KVM_PARA_H
+
+
+#endif
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 5a9d4e350d..0afbbab893 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -111,6 +111,7 @@ struct kvm_irq_level {
* ACPI gsi notion of irq.
* For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47..
* For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23..
+ * For ARM: IRQ: irq = (2*vcpu_index). FIQ: irq = (2*vcpu_indx + 1).
*/
union {
__u32 irq;
@@ -901,6 +902,8 @@ struct kvm_s390_ucas_mapping {
#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)
/* VM is being stopped by host */
#define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad)
+#define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init)
+#define KVM_VCPU_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0xaf, struct kvm_msr_list)
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)