mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kvm_host: unify VM_STAT and VCPU_STAT definitions in a single place
The macros VM_STAT and VCPU_STAT are redundantly implemented in multiple files, each used by a different architecure to initialize the debugfs entries for statistics. Since they all have the same purpose, they can be unified in a single common definition in include/linux/kvm_host.h Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20200414155625.20559-1-eesposit@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
63d0434837
commit
812756a82e
7 changed files with 231 additions and 243 deletions
|
@ -1130,6 +1130,11 @@ struct kvm_stats_debugfs_item {
|
|||
#define KVM_DBGFS_GET_MODE(dbgfs_item) \
|
||||
((dbgfs_item)->mode ? (dbgfs_item)->mode : 0644)
|
||||
|
||||
#define VM_STAT(n, x, ...) \
|
||||
{ n, offsetof(struct kvm, stat.x), KVM_STAT_VM, ## __VA_ARGS__ }
|
||||
#define VCPU_STAT(n, x, ...) \
|
||||
{ n, offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU, ## __VA_ARGS__ }
|
||||
|
||||
extern struct kvm_stats_debugfs_item debugfs_entries[];
|
||||
extern struct dentry *kvm_debugfs_dir;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue