diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2013-09-24 01:55:56 +0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2013-12-21 22:01:22 +0400 |
commit | ce01e4e8874d410738f4b4733b26642d6611a331 (patch) | |
tree | f58e80efb4fc588858f4c16e48dec45659cb5048 /arch/arm | |
parent | 7330672befe6269e575f79b924a7068b26c144b4 (diff) | |
download | linux-ce01e4e8874d410738f4b4733b26642d6611a331.tar.xz |
KVM: arm-vgic: Set base addr through device API
Support setting the distributor and cpu interface base addresses in the
VM physical address space through the KVM_{SET,GET}_DEVICE_ATTR API
in addition to the ARM specific API.
This has the added benefit of being able to share more code in user
space and do things in a uniform manner.
Also deprecate the older API at the same time, but backwards
compatibility will be maintained.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/uapi/asm/kvm.h | 2 | ||||
-rw-r--r-- | arch/arm/kvm/arm.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h index 835b8678de03..76a742769e2b 100644 --- a/arch/arm/include/uapi/asm/kvm.h +++ b/arch/arm/include/uapi/asm/kvm.h @@ -163,6 +163,8 @@ struct kvm_arch_memory_slot { #define KVM_REG_ARM_VFP_FPINST 0x1009 #define KVM_REG_ARM_VFP_FPINST2 0x100A +/* Device Control API: ARM VGIC */ +#define KVM_DEV_ARM_VGIC_GRP_ADDR 0 /* KVM_IRQ_LINE irq field index values */ #define KVM_ARM_IRQ_TYPE_SHIFT 24 diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index cc7c41af9c38..f290b2250ed5 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -776,7 +776,7 @@ static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm, case KVM_ARM_DEVICE_VGIC_V2: if (!vgic_present) return -ENXIO; - return kvm_vgic_set_addr(kvm, type, dev_addr->addr); + return kvm_vgic_addr(kvm, type, &dev_addr->addr, true); default: return -ENODEV; } |