diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2014-02-26 17:20:00 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-26 17:20:00 +0000 |
commit | 1da41cc1c6c3efbe2ed47228068bd80dbdc49d0e (patch) | |
tree | 2fa16d32851b0889de1f247f5ae59d6f2246fce0 /target-arm/kvm_arm.h | |
parent | 0a6a7ccaae4015aa02bdbce75bafb9d868636655 (diff) | |
download | qemu-1da41cc1c6c3efbe2ed47228068bd80dbdc49d0e.zip qemu-1da41cc1c6c3efbe2ed47228068bd80dbdc49d0e.tar.gz qemu-1da41cc1c6c3efbe2ed47228068bd80dbdc49d0e.tar.bz2 |
arm: vgic device control api support
Support creating the ARM vgic device through the device control API and
setting the base address for the distributor and cpu interfaces in KVM
VMs using this API.
Because the older KVM_CREATE_IRQCHIP interface needs the irq chip to be
created prior to creating the VCPUs, we first test if we can use the
device control API in kvm_arch_irqchip_create (using the test flag from
the device control API). If we cannot, it means we have to fall back to
KVM_CREATE_IRQCHIP and use the older ioctl at this point in time. If
however, we can use the device control API, we don't do anything and
wait until the arm_gic_kvm driver initializes and let that use the
device control API.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1392687720-26806-5-git-send-email-christoffer.dall@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/kvm_arm.h')
-rw-r--r-- | target-arm/kvm_arm.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h index cd3d13c..137c567 100644 --- a/target-arm/kvm_arm.h +++ b/target-arm/kvm_arm.h @@ -18,16 +18,21 @@ * kvm_arm_register_device: * @mr: memory region for this device * @devid: the KVM device ID + * @group: device control API group for setting addresses + * @attr: device control API address type + * @dev_fd: device control device file descriptor (or -1 if not supported) * * Remember the memory region @mr, and when it is mapped by the * machine model, tell the kernel that base address using the - * KVM_SET_DEVICE_ADDRESS ioctl. @devid should be the ID of - * the device as defined by KVM_SET_DEVICE_ADDRESS. - * The machine model may map and unmap the device multiple times; - * the kernel will only be told the final address at the point - * where machine init is complete. + * KVM_ARM_SET_DEVICE_ADDRESS ioctl or the newer device control API. @devid + * should be the ID of the device as defined by KVM_ARM_SET_DEVICE_ADDRESS or + * the arm-vgic device in the device control API. + * The machine model may map + * and unmap the device multiple times; the kernel will only be told the final + * address at the point where machine init is complete. */ -void kvm_arm_register_device(MemoryRegion *mr, uint64_t devid); +void kvm_arm_register_device(MemoryRegion *mr, uint64_t devid, uint64_t group, + uint64_t attr, int dev_fd); /** * write_list_to_kvmstate: |