[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 4/4] arm: vgic device control api support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 4/4] arm: vgic device control api support |
Date: |
Mon, 14 Oct 2013 14:49:28 +0100 |
On 26 September 2013 20:56, Christoffer Dall
<address@hidden> wrote:
> 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 <address@hidden>
> + if (ret < 0) {
> + fprintf(stderr, "Failed to set device address: %s\n",
> + strerror(-ret));
> + abort();
> + }
Your indentation here is wrong.
> diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
> index 5d14887..ea1805a 100644
> --- a/target-arm/kvm_arm.h
> +++ b/target-arm/kvm_arm.h
> @@ -18,16 +18,22 @@
> * kvm_arm_register_device:
> * @mr: memory region for this device
> * @devid: the KVM device ID
> + * @type: device control API device type
> + * @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)
This adds documentation for four new parameters...
> -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);
...but the prototype only adds three (no new 'type'
param).
Looks good otherwise.
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC PATCH v2 4/4] arm: vgic device control api support,
Peter Maydell <=