mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 14:44:10 +08:00
KVM: switch per-VM stats to u64
Make them the same type as vCPU stats. There is no reason to limit the counters to unsigned long. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ade74e1433
commit
e3cb6fa0e2
@ -556,7 +556,7 @@ static inline bool __vcpu_write_sys_reg_to_cpu(u64 val, int reg)
|
||||
}
|
||||
|
||||
struct kvm_vm_stat {
|
||||
ulong remote_tlb_flush;
|
||||
u64 remote_tlb_flush;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_stat {
|
||||
|
@ -109,7 +109,7 @@ static inline bool kvm_is_error_hva(unsigned long addr)
|
||||
}
|
||||
|
||||
struct kvm_vm_stat {
|
||||
ulong remote_tlb_flush;
|
||||
u64 remote_tlb_flush;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_stat {
|
||||
|
@ -81,9 +81,9 @@ struct kvmppc_book3s_shadow_vcpu;
|
||||
struct kvm_nested_guest;
|
||||
|
||||
struct kvm_vm_stat {
|
||||
ulong remote_tlb_flush;
|
||||
ulong num_2M_pages;
|
||||
ulong num_1G_pages;
|
||||
u64 remote_tlb_flush;
|
||||
u64 num_2M_pages;
|
||||
u64 num_1G_pages;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_stat {
|
||||
|
@ -1158,17 +1158,17 @@ struct kvm_arch {
|
||||
};
|
||||
|
||||
struct kvm_vm_stat {
|
||||
ulong mmu_shadow_zapped;
|
||||
ulong mmu_pte_write;
|
||||
ulong mmu_pde_zapped;
|
||||
ulong mmu_flooded;
|
||||
ulong mmu_recycled;
|
||||
ulong mmu_cache_miss;
|
||||
ulong mmu_unsync;
|
||||
ulong remote_tlb_flush;
|
||||
ulong lpages;
|
||||
ulong nx_lpage_splits;
|
||||
ulong max_mmu_page_hash_collisions;
|
||||
u64 mmu_shadow_zapped;
|
||||
u64 mmu_pte_write;
|
||||
u64 mmu_pde_zapped;
|
||||
u64 mmu_flooded;
|
||||
u64 mmu_recycled;
|
||||
u64 mmu_cache_miss;
|
||||
u64 mmu_unsync;
|
||||
u64 remote_tlb_flush;
|
||||
u64 lpages;
|
||||
u64 nx_lpage_splits;
|
||||
u64 max_mmu_page_hash_collisions;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_stat {
|
||||
|
@ -4833,14 +4833,14 @@ static int kvm_debugfs_release(struct inode *inode, struct file *file)
|
||||
|
||||
static int kvm_get_stat_per_vm(struct kvm *kvm, size_t offset, u64 *val)
|
||||
{
|
||||
*val = *(ulong *)((void *)kvm + offset);
|
||||
*val = *(u64 *)((void *)kvm + offset);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kvm_clear_stat_per_vm(struct kvm *kvm, size_t offset)
|
||||
{
|
||||
*(ulong *)((void *)kvm + offset) = 0;
|
||||
*(u64 *)((void *)kvm + offset) = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user