Update headers based on kvm.next and kvm-arm v6. Not sure if this should only be the ARM-specific changes. Hmmm. Signed-off-by: Christoffer Dall <c.dall at virtualopensystems.com> --- linux-headers/asm-arm/kvm.h | 23 ++++++++++++++++------- linux-headers/asm-arm/kvm_para.h | 6 +++--- linux-headers/asm-s390/kvm.h | 2 ++ linux-headers/asm-x86/kvm.h | 1 + linux-headers/linux/kvm.h | 7 +++++++ 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h index b535632..38ff1d6 100644 --- a/linux-headers/asm-arm/kvm.h +++ b/linux-headers/asm-arm/kvm.h @@ -19,6 +19,9 @@ #include <asm/types.h> +#define __KVM_HAVE_GUEST_DEBUG +#define __KVM_HAVE_IRQ_LINE + /* * KVM_IRQ_LINE macros to set/read IRQ/FIQ for specific VCPU index. */ @@ -33,13 +36,15 @@ enum KVM_ARM_IRQ_LINE_TYPE { * * Note: These indices do NOT correspond to the value of the CPSR mode bits! */ -#define MODE_FIQ 0 -#define MODE_IRQ 1 -#define MODE_SVC 2 -#define MODE_ABT 3 -#define MODE_UND 4 -#define MODE_USR 5 -#define MODE_SYS 6 +enum vcpu_mode { + MODE_FIQ = 0, + MODE_IRQ, + MODE_SVC, + MODE_ABT, + MODE_UND, + MODE_USR, + MODE_SYS +}; struct kvm_regs { __u32 regs0_7[8]; /* Unbanked regs. (r0 - r7) */ @@ -55,6 +60,7 @@ struct kvm_regs { __u32 c1_sys; __u32 c2_base0; __u32 c2_base1; + __u32 c2_control; __u32 c3_dacr; } cp15; @@ -75,4 +81,7 @@ struct kvm_debug_exit_arch { struct kvm_sync_regs { }; +struct kvm_arch_memory_slot { +}; + #endif /* __ARM_KVM_H__ */ diff --git a/linux-headers/asm-arm/kvm_para.h b/linux-headers/asm-arm/kvm_para.h index ee10035..ac0e5e1 100644 --- a/linux-headers/asm-arm/kvm_para.h +++ b/linux-headers/asm-arm/kvm_para.h @@ -1,9 +1,9 @@ -#ifndef _ASM_X86_KVM_PARA_H -#define _ASM_X86_KVM_PARA_H +#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_X86_KVM_PARA_H */ +#endif /* _ASM_ARM_KVM_PARA_H */ diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 9acbde4..9607667 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390/kvm.h @@ -44,10 +44,12 @@ struct kvm_guest_debug_arch { #define KVM_SYNC_PREFIX (1UL << 0) #define KVM_SYNC_GPRS (1UL << 1) #define KVM_SYNC_ACRS (1UL << 2) +#define KVM_SYNC_CRS (1UL << 3) /* definition of registers in kvm_run */ struct kvm_sync_regs { __u64 prefix; /* prefix register */ __u64 gprs[16]; /* general purpose registers */ __u32 acrs[16]; /* access registers */ + __u64 crs[16]; /* control registers */ }; #endif diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index e7d1c19..246617e 100644 --- a/linux-headers/asm-x86/kvm.h +++ b/linux-headers/asm-x86/kvm.h @@ -12,6 +12,7 @@ /* Select x86 specific features in <linux/kvm.h> */ #define __KVM_HAVE_PIT #define __KVM_HAVE_IOAPIC +#define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_DEVICE_ASSIGNMENT #define __KVM_HAVE_MSI #define __KVM_HAVE_USER_NMI diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index f6b5343..e4b40c5 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; @@ -588,6 +589,7 @@ struct kvm_ppc_pvinfo { #define KVM_CAP_TSC_DEADLINE_TIMER 72 #define KVM_CAP_S390_UCONTROL 73 #define KVM_CAP_SYNC_REGS 74 +#define KVM_CAP_PCI_2_3 75 #ifdef KVM_CAP_IRQ_ROUTING @@ -784,6 +786,9 @@ struct kvm_s390_ucas_mapping { /* Available with KVM_CAP_TSC_CONTROL */ #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) +/* Available with KVM_CAP_PCI_2_3 */ +#define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, \ + struct kvm_assigned_pci_dev) /* * ioctls for vcpu fds @@ -857,6 +862,8 @@ struct kvm_s390_ucas_mapping { #define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg) #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) +#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) +#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) struct kvm_assigned_pci_dev { __u32 assigned_dev_id;