On Mon, Jun 30, 2014 at 06:22:55PM +0100, Paolo Bonzini wrote:
> Il 30/06/2014 11:21, Cornelia Huck ha scritto:
> > On Thu, 26 Jun 2014 18:30:16 +0100
> > Will Deacon <[email protected]> wrote:
> >> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> >> index e11d8f170a62..3b368166286f 100644
> >> --- a/include/uapi/linux/kvm.h
> >> +++ b/include/uapi/linux/kvm.h
> >> @@ -949,6 +949,7 @@ struct kvm_device_attr {
> >>  #define   KVM_DEV_VFIO_GROUP_DEL                  2
> >>  #define KVM_DEV_TYPE_ARM_VGIC_V2  5
> >>  #define KVM_DEV_TYPE_FLIC         6
> >> +#define KVM_DEV_TYPE_MAX          7
> >
> > This means we always need to move this value once we introduce a new
> > kvm device type. Can't you keep it in a dynamic list instead of a
> > table? We just need to do the lookup during device creation anyway.
> 
> There's also this wonderful thing called enum. ;)
> 
> It would let Will keep the simpler code with an array, and autogenerate 
> KVM_DEV_TYPE_MAX.

Although this is uapi, so we may need to #define the symbols anyway to avoid
breaking userspace #ifndef tests.

What do you reckon; is this an ABI break?

Will
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to