Re: [PATCH 05/18] KVM: arm64: Add helpers to manipulate vcpu flags among a set

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

 



Hi Marc,

> > > +#define vcpu_get_flag(v, ...)  __vcpu_get_flag(v, __VA_ARGS__)
> > > +#define vcpu_set_flag(v, ...)  __vcpu_set_flag(v, __VA_ARGS__)
> > > +#define vcpu_clear_flag(v, ...)        __vcpu_clear_flag(v, __VA_ARGS__)
> > > +
> > > +#define __vcpu_single_flag(_set, _f)   _set, (_f), (_f)
> > > +
> > > +#define __flag_unpack(_set, _f, _m)    _f
> >
> > Nit: Probably it might be worth adding a comment that explains the
> > above two macros ? (e.g. what is each element of the triplets ?)
>
> How about this?
>
> /*
>  * Each 'flag' is composed of a comma-separated triplet:
>  *
>  * - the flag-set it belongs to in the vcpu->arch structure
>  * - the value for that flag
>  * - the mask for that flag
>  *
>  *  __vcpu_single_flag() builds such a triplet for a single-bit flag.
>  * unpack_vcpu_flag() extract the flag value from the triplet for
>  * direct use outside of the flag accessors.
>  */

Looks good to me, thank you!
Reiji
_______________________________________________
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