On 13/04/20 23:34, Philippe Mathieu-Daudà wrote:Hi Philippe and Paolo,
+#define VM_STAT(x, ...) offsetof(struct kvm, stat.x), KVM_STAT_VM, ## __VA_ARGS__I find this macro expanding into multiple fields odd... Maybe a matter
+#define VCPU_STAT(x, ...) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU, ## __VA_ARGS__
of taste. Sugggestion, have the macro define the full structure, as in
the arm64 arch:
#define VM_STAT(n, x, ...) { n, offsetof(struct kvm, stat.x),
KVM_STAT_VM, ## __VA_ARGS__ }
Ditto for VCPU_STAT().
Yes, that's a good idea. Emanuele, can you switch it to this format?