kvm: Refactor handling of VM debugfs files
authorMilan Pandurov <milanpa@amazon.de>
Fri, 13 Dec 2019 13:07:21 +0000 (14:07 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Jan 2020 13:45:33 +0000 (14:45 +0100)
commit09cbcef6c60e77af11c3f27e62ea3f291a5d436c
treef72b179f599614c167e1fddad5f532faad072376
parente30a7d623dccdb3f880fbcad980b0cb589a1da45
kvm: Refactor handling of VM debugfs files

We can store reference to kvm_stats_debugfs_item instead of copying
its values to kvm_stat_data.
This allows us to remove duplicated code and usage of temporary
kvm_stat_data inside vm_stat_get et al.

Signed-off-by: Milan Pandurov <milanpa@amazon.de>
Reviewed-by: Alexander Graf <graf@amazon.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/kvm_host.h
virt/kvm/kvm_main.c