Re: [PATCH 10/10] KVM: ARM: VGIC: Keep the max irq numbers consistent.

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

 



On 17/11/14 09:27, wanghaibin wrote:
> Now, the VGIC can support the 256 legacy irqs, when userspace inject
> irqs, checking the irq parameter should be keep the consistent.
> 
> Signed-off-by: wanghaibin <wanghaibin.wang@xxxxxxxxxx>
> ---
>  arch/arm/kvm/arm.c                |    2 +-
>  arch/arm64/include/uapi/asm/kvm.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 9e193c8..e3ccb1e 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -640,7 +640,7 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level,
>  			return -ENXIO;
>  
>  		if (irq_num < VGIC_NR_PRIVATE_IRQS ||
> -		    irq_num > KVM_ARM_IRQ_GIC_MAX)
> +		    irq_num >= VGIC_NR_IRQS_LEGACY)
>  			return -EINVAL;
>  
>  		return kvm_vgic_inject_irq(kvm, 0, irq_num, level);
> diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
> index 8e38878..e77e299 100644
> --- a/arch/arm64/include/uapi/asm/kvm.h
> +++ b/arch/arm64/include/uapi/asm/kvm.h
> @@ -180,7 +180,7 @@ struct kvm_arch_memory_slot {
>  #define KVM_ARM_IRQ_CPU_FIQ		1
>  
>  /* Highest supported SPI, from VGIC_NR_IRQS */
> -#define KVM_ARM_IRQ_GIC_MAX		127
> +#define KVM_ARM_IRQ_GIC_MAX		255

No. I'm quite happy for this to stay as low as possible, even if that
doesn't reflect when the generic code actually supports.

But you're not even fixing the actual bug in this code path (hint: we
now have dynamic number of interrupts).

	M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux