diff options
author | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-23 13:18:04 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-02-11 13:58:39 -0500 |
commit | 3401d54696f992edf036f00f46c8c399d1b75c2a (patch) | |
tree | bbb3bb02050b3b513e4b55839b553d793c1e63b9 /arch/arm/include | |
parent | a96ab03917dcf4c9477d03b31e8d74779bca1074 (diff) |
KVM: ARM: Introduce KVM_ARM_SET_DEVICE_ADDR ioctl
On ARM some bits are specific to the model being emulated for the guest and
user space needs a way to tell the kernel about those bits. An example is mmio
device base addresses, where KVM must know the base address for a given device
to properly emulate mmio accesses within a certain address range or directly
map a device with virtualiation extensions into the guest address space.
We make this API ARM-specific as we haven't yet reached a consensus for a
generic API for all KVM architectures that will allow us to do something like
this.
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/uapi/asm/kvm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h index 3303ff5adbf3..346ac3f4a2b8 100644 --- a/arch/arm/include/uapi/asm/kvm.h +++ b/arch/arm/include/uapi/asm/kvm.h | |||
@@ -65,6 +65,19 @@ struct kvm_regs { | |||
65 | #define KVM_ARM_TARGET_CORTEX_A15 0 | 65 | #define KVM_ARM_TARGET_CORTEX_A15 0 |
66 | #define KVM_ARM_NUM_TARGETS 1 | 66 | #define KVM_ARM_NUM_TARGETS 1 |
67 | 67 | ||
68 | /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ | ||
69 | #define KVM_ARM_DEVICE_TYPE_SHIFT 0 | ||
70 | #define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) | ||
71 | #define KVM_ARM_DEVICE_ID_SHIFT 16 | ||
72 | #define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) | ||
73 | |||
74 | /* Supported device IDs */ | ||
75 | #define KVM_ARM_DEVICE_VGIC_V2 0 | ||
76 | |||
77 | /* Supported VGIC address types */ | ||
78 | #define KVM_VGIC_V2_ADDR_TYPE_DIST 0 | ||
79 | #define KVM_VGIC_V2_ADDR_TYPE_CPU 1 | ||
80 | |||
68 | #define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ | 81 | #define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ |
69 | 82 | ||
70 | struct kvm_vcpu_init { | 83 | struct kvm_vcpu_init { |