Re: [RFC PATCH 1/3] KVM: ARM: Introduce KVM_INIT_IRQCHIP ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 October 2012 01:04, Christoffer Dall
<c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Used to initialize the in-kernel interrupt controller. On ARM we need to
> map the virtual generic interrupt controller (vGIC) into Hyp the guest's
> physicall address space so the guest can access the virtual cpu
> interface. This must be done after the IRQ chips is create and after a
> base address has been provided for the emulated platform (patch is
> following), but before the CPU is initally run.

I've now written the code for that patch but don't have access to a machine
with the ARM cross compile setup to build it until tomorrow.

>
> Signed-off-by: Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx>
> ---
>  Documentation/virtual/kvm/api.txt |   16 ++++++++++++++++
>  arch/arm/kvm/arm.c                |    1 +
>  include/linux/kvm.h               |    3 +++
>  3 files changed, 20 insertions(+)
>
> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> index 25eacc6..26e953d 100644
> --- a/Documentation/virtual/kvm/api.txt
> +++ b/Documentation/virtual/kvm/api.txt
> @@ -2102,6 +2102,22 @@ This ioctl returns the guest registers that are supported for the
>  KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
>
>
> +4.79 KVM_INIT_IRQCHIP
> +
> +Capability: KVM_CAP_INIT_IRQCHIP
> +Architectures: arm
> +Type: vm ioctl
> +Parameters: none
> +Returns: 0 on success, -1 on error
> +
> +Initialize the in-kernel interrupt controller. On ARM we need to map the
> +virtual generic interrupt controller (vGIC) into Hyp the guest's physicall

Should that "Hyp" be deleted?

"physical"

> +address space so the guest can access the virtual cpu interface. This must be
> +done after the IRQ chips is create and after a base address has been provided

"chip". "created".

> +for the emulated platofrm (see KVM_SET_DEVICE_ADDRESS), but before the CPU is
> +initally run.

"initially".

(all these typos are also in your commit message)

> +
> +
>  5. The kvm_run structure
>  ------------------------
>
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index f8c377b..85c76e4 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -195,6 +195,7 @@ int kvm_dev_ioctl_check_extension(long ext)
>         switch (ext) {
>  #ifdef CONFIG_KVM_ARM_VGIC
>         case KVM_CAP_IRQCHIP:
> +       case KVM_CAP_INIT_IRQCHIP:
>                 r = vgic_present;
>                 break;
>  #endif
> diff --git a/include/linux/kvm.h b/include/linux/kvm.h
> index 8091b1d..90ee023 100644
> --- a/include/linux/kvm.h
> +++ b/include/linux/kvm.h
> @@ -626,6 +626,7 @@ struct kvm_ppc_smmu_info {
>  #ifdef __KVM_HAVE_READONLY_MEM
>  #define KVM_CAP_READONLY_MEM 81
>  #endif
> +#define KVM_CAP_INIT_IRQCHIP 82
>
>  #ifdef KVM_CAP_IRQ_ROUTING
>
> @@ -839,6 +840,8 @@ struct kvm_s390_ucas_mapping {
>  #define KVM_PPC_GET_SMMU_INFO    _IOR(KVMIO,  0xa6, struct kvm_ppc_smmu_info)
>  /* Available with KVM_CAP_PPC_ALLOC_HTAB */
>  #define KVM_PPC_ALLOCATE_HTAB    _IOWR(KVMIO, 0xa7, __u32)
> +/* Available with KVM_CAP_INIT_IRQCHIP */
> +#define KVM_INIT_IRQCHIP         _IO(KVMIO,   0xa8)
>
>  /*
>   * ioctls for vcpu fds
> --
> 1.7.9.5
>


-- PMM
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux