diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2013-12-28 14:26:48 +0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-12-28 14:26:48 +0400 |
commit | 60dd133a7b77b6adc2d18ff1a85db5a67434a071 (patch) | |
tree | eb547e3490340335770449ad81d13b9c9f0e5031 /arch/arm64 | |
parent | 989c6b34f6a9480e397b170cc62237e89bf4fdb9 (diff) | |
parent | fa20f5aea56f271f83e91b9cde00f043a5a14990 (diff) | |
download | linux-60dd133a7b77b6adc2d18ff1a85db5a67434a071.tar.xz |
Merge tag 'vgic-migrate-for-marc' of git://git.linaro.org/people/christoffer.dall/linux-kvm-arm into kvm-arm64/next
VGIC and timer migration pull
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/uapi/asm/kvm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h index 5031f4263937..7c25ca8b02b3 100644 --- a/arch/arm64/include/uapi/asm/kvm.h +++ b/arch/arm64/include/uapi/asm/kvm.h @@ -129,6 +129,24 @@ struct kvm_arch_memory_slot { #define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007 #define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0 +#define ARM64_SYS_REG_SHIFT_MASK(x,n) \ + (((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & \ + KVM_REG_ARM64_SYSREG_ ## n ## _MASK) + +#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) \ + (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | \ + ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | \ + ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | \ + ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | \ + ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | \ + ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) + +#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) + +#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) +#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) +#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) + /* KVM_IRQ_LINE irq field index values */ #define KVM_ARM_IRQ_TYPE_SHIFT 24 #define KVM_ARM_IRQ_TYPE_MASK 0xff |