Re: [PATCH 01/10] ARM: KVM: vgic: fix kvm_vgic_vcpu_init() return value

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

 



On Wed, Nov 21, 2012 at 1:15 PM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
> Patch 641622d2 (KVM: ARM: Make VGIC_MAX_CPUS equal to KVM_MAX_VCPUS)
> must have been tested with a very forgiving compiler, as it lacks
> a return value in the normal path...
>
> Also fix the non-vgic case, which has a different taste of brokeness.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> ---
>  arch/arm/include/asm/kvm_vgic.h | 6 +++++-
>  arch/arm/kvm/vgic.c             | 2 ++
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/kvm_vgic.h b/arch/arm/include/asm/kvm_vgic.h
> index 065aa0b..e371100 100644
> --- a/arch/arm/include/asm/kvm_vgic.h
> +++ b/arch/arm/include/asm/kvm_vgic.h
> @@ -280,7 +280,11 @@ static inline int kvm_vgic_create(struct kvm *kvm)
>         return 0;
>  }
>
> -static inline void kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu) {}
> +static inline int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu)
> +{
> +       return 0;
> +}
> +
>  static inline void kvm_vgic_sync_to_cpu(struct kvm_vcpu *vcpu) {}
>  static inline void kvm_vgic_sync_from_cpu(struct kvm_vcpu *vcpu) {}
>
> diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c
> index 922a0aa..f9478ea 100644
> --- a/arch/arm/kvm/vgic.c
> +++ b/arch/arm/kvm/vgic.c
> @@ -1077,6 +1077,8 @@ int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu)
>         vgic_cpu->vgic_vmcr = reg | (0x1f << 27); /* Priority */
>
>         vgic_cpu->vgic_hcr |= VGIC_HCR_EN; /* Get the show on the road... */
> +
> +       return 0;
>  }
>
>  static void vgic_init_maintenance_interrupt(void *info)
> --
> 1.7.12
>
complete brain damage on my side, thanks!

-Christoffer
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/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