On Tue, Apr 02, 2013 at 08:57:52PM -0500, Scott Wood wrote:
> Hook the MPIC code up to the KVM interfaces, add locking, etc.

[snip]

> @@ -2164,6 +2164,15 @@ static int kvm_ioctl_create_device(struct kvm *kvm,
>       bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
>  
>       switch (cd->type) {
> +#ifdef CONFIG_KVM_MPIC
> +     case KVM_DEV_TYPE_FSL_MPIC_20:
> +     case KVM_DEV_TYPE_FSL_MPIC_42: {
> +             if (test)
> +                     return 0;
> +
> +             return kvm_create_mpic(kvm, cd->type);
> +     }
> +#endif

I think this needs to be more like:

#ifdef CONFIG_KVM_MPIC
        case KVM_DEV_TYPE_FSL_MPIC_20:
        case KVM_DEV_TYPE_FSL_MPIC_42: {
                int fd;

                if (test)
                        return 0;

                fd = kvm_create_mpic(kvm, cd->type);
                if (fd < 0)
                        return fd;
                cd->fd = fd;
                return 0;
        }
#endif

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

Reply via email to