aboutsummaryrefslogtreecommitdiff
path: root/linux-headers/linux/kvm.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-09-14 18:12:37 +0100
committerPeter Maydell <peter.maydell@linaro.org>2012-09-14 18:12:37 +0100
commit3ba192404e834ad7bc384675e7502578de61d98f (patch)
tree32b8dd001b288c8e6d1683f3437bf74a0cd17a1c /linux-headers/linux/kvm.h
parente725def7016382950a6c8a53c562ad70b286962b (diff)
linux-headers: Add ARM KVM headers (not for upstream)
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit. This is the result of running update-headers on Christoffer's kvm-arm-master branch commit 6024647. It includes the new interrupt delivery ABI and the switch to ONE_REG for core and coprocessor registers. It currently includes some minor x86 header changes which hopefully will have made it into QEMU upstream by the time we submit this for merging.
Diffstat (limited to 'linux-headers/linux/kvm.h')
-rw-r--r--linux-headers/linux/kvm.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 4b9e575dd0..7a02d73224 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -101,9 +101,13 @@ struct kvm_userspace_memory_region {
__u64 userspace_addr; /* start of the userspace allocated memory */
};
-/* for kvm_memory_region::flags */
-#define KVM_MEM_LOG_DIRTY_PAGES 1UL
-#define KVM_MEMSLOT_INVALID (1UL << 1)
+/*
+ * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace,
+ * other bits are reserved for kvm internal use which are defined in
+ * include/linux/kvm_host.h.
+ */
+#define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
+#define KVM_MEM_READONLY (1UL << 1)
/* for KVM_IRQ_LINE */
struct kvm_irq_level {
@@ -111,6 +115,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;
@@ -618,6 +623,9 @@ struct kvm_ppc_smmu_info {
#define KVM_CAP_PPC_GET_SMMU_INFO 78
#define KVM_CAP_S390_COW 79
#define KVM_CAP_PPC_ALLOC_HTAB 80
+#ifdef __KVM_HAVE_READONLY_MEM
+#define KVM_CAP_READONLY_MEM 81
+#endif
#ifdef KVM_CAP_IRQ_ROUTING
@@ -904,6 +912,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_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list)
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)