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 10/14/2012 02:04 AM, Christoffer Dall 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.
> 
>  
> +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
> +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 platofrm (see KVM_SET_DEVICE_ADDRESS), but before the CPU is
> +initally run.
> +

What enforces this?

Can it be done automatically?  issue a
kvm_make_request(KVM_REQ_INIT_IRQCHIP) on vcpu creation, and you'll
automatically be notified before the first guest entry.

Having an ioctl that must be called after point A but before point B
seems pointless, when A and B are both known.

> +
>  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:

This could be part of a baseline, if you don't envision ever taking it out.


-- 
error compiling committee.c: too many arguments to function
--
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