kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h
Subsystems (12)
PATCH RESEND v5 1/5 kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h
The next commit will introduce a member to the kvmppc_vcore struct which references MAX_SMT_THREADS which is defined in kvm_book3s_asm.h, however this file isn't included in kvm_host.h directly. Thus compiling for certain platforms such as pmac32_defconfig and ppc64e_defconfig with KVM fails due to MAX_SMT_THREADS not being defined.
Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h.
---
Change Log:
V1 -> V2:
- Added patch to series
--- arch/powerpc/include/asm/kvm_book3s.h | 35 +++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/kvm_host.h | 35 ----------------------------------- 2 files changed, 35 insertions(+), 35 deletions(-)
arch/powerpc/include/asm/kvm_book3s.h +35 -0
@@ -69,6 +69,41 @@ struct hpte_cache {int pagesize; }; +/* +* Struct for a virtual core. +* Note: entry_exit_map combines a bitmap of threads that have entered +* in the bottom 8 bits and a bitmap of threads that have exited in the +* next 8 bits. This is so that we can atomically set the entry bit +* iff the exit map is 0 without taking a lock. +*/ +struct kvmppc_vcore { +int n_runnable; +int num_threads; +int entry_exit_map; +int napping_threads; +int first_vcpuid; +u16 pcpu; +u16 last_cpu; +u8 vcore_state; +u8 in_guest; +struct kvmppc_vcore *master_vcore; +struct list_head runnable_threads; +struct list_head preempt_list; +spinlock_t lock; +struct swait_queue_head wq; +spinlock_t stoltb_lock;/* protects stolen_tb and preempt_tb */ +u64 stolen_tb; +u64 preempt_tb; +struct kvm_vcpu *runner; +struct kvm *kvm; +u64 tb_offset;/* guest timebase - host timebase */ +ulong lpcr; +u32 arch_compat; +ulong pcr; +ulong dpdes;/* doorbell state (POWER8) */ +ulong conferring_threads; +}; +struct kvmppc_vcpu_book3s {struct kvmppc_sid_map sid_map[SID_MAP_NUM ];struct {
arch/powerpc/include/asm/kvm_host.h +0 -35
@@ -275,41 +275,6 @@ struct kvm_arch {#endif }; -/* -* Struct for a virtual core. -* Note: entry_exit_map combines a bitmap of threads that have entered -* in the bottom 8 bits and a bitmap of threads that have exited in the -* next 8 bits. This is so that we can atomically set the entry bit -* iff the exit map is 0 without taking a lock. -*/ -struct kvmppc_vcore { -int n_runnable; -int num_threads; -int entry_exit_map; -int napping_threads; -int first_vcpuid; -u16 pcpu; -u16 last_cpu; -u8 vcore_state; -u8 in_guest; -struct kvmppc_vcore *master_vcore; -struct list_head runnable_threads; -struct list_head preempt_list; -spinlock_t lock; -struct swait_queue_head wq; -spinlock_t stoltb_lock;/* protects stolen_tb and preempt_tb */ -u64 stolen_tb; -u64 preempt_tb; -struct kvm_vcpu *runner; -struct kvm *kvm; -u64 tb_offset;/* guest timebase - host timebase */ -ulong lpcr; -u32 arch_compat; -ulong pcr; -ulong dpdes;/* doorbell state (POWER8) */ -ulong conferring_threads; -}; -#define VCORE_ENTRY_MAP (vc) ((vc)->entry_exit_map & 0xff)#define VCORE_EXIT_MAP (vc) ((vc)->entry_exit_map >> 8)#define VCORE_IS_EXITING (vc) (VCORE_EXIT_MAP(vc) != 0)
Signature · 1 line
2.5.5
PATCH RESEND v5 2/5 kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array
The struct kvmppc_vcore is a structure used to store various information about a virtual core for a kvm guest. The runnable_threads element of the struct provides a list of all of the currently runnable vcpus on the core (those in the KVMPPC_VCPU_RUNNABLE state). The previous implementation of this list was a linked_list. The next patch requires that the list be able to be iterated over without holding the vcore lock.
Reimplement the runnable_threads list in the kvmppc_vcore struct as an array. Implement function to iterate over valid entries in the array and update access sites accordingly.
--- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +++++++++++++++++++++-------------- 3 files changed, 43 insertions(+), 28 deletions(-)
arch/powerpc/include/asm/kvm_book3s.h +1 -1
@@ -87,7 +87,7 @@ struct kvmppc_vcore {u8 vcore_state;u8 in_guest;struct kvmppc_vcore *master_vcore; -struct list_head runnable_threads; +struct kvm_vcpu *runnable_threads[MAX_SMT_THREADS ];struct list_head preempt_list;spinlock_t lock;struct swait_queue_head wq;
arch/powerpc/include/asm/kvm_host.h +0 -1
@@ -633,7 +633,6 @@ struct kvm_vcpu_arch {long pgfault_index;unsigned long pgfault_hpte[2 ]; -struct list_head run_list;struct task_struct *run_task;struct kvm_run *kvm_run;
arch/powerpc/kvm/book3s_hv.c +42 -26
177 lines not on this page · raw message
Signature · 1 line
2.5.5
PATCH RESEND v5 3/5 kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module
In reply to Suraj Jitindar SinghThis patch introduces new halt polling functionality into the kvm_hv kernel module. When a vcore is idle it will poll for some period of time before scheduling itself out.
When all of the runnable vcpus on a vcore have ceded (and thus the vcore is idle) we schedule ourselves out to allow something else to run. In the event that we need to wake up very quickly (for example an interrupt arrives), we are required to wait until we get scheduled again.
Implement halt polling so that when a vcore is idle, and before scheduling ourselves, we poll for vcpus in the runnable_threads list which have pending exceptions or which leave the ceded state. If we poll successfully then we can get back into the guest very quickly without ever scheduling ourselves, otherwise we schedule ourselves out as before.
There exists generic halt_polling code in virt/kvm_main.c, however on powerpc the polling conditions are different to the generic case. It would be nice if we could just implement an arch specific kvm_check_block() function, but there is still other arch specific things which need to be done for kvm_hv (for example manipulating vcore states) which means that a separate implementation is the best option.
Testing of this patch with a TCP round robin test between two guests with virtio network interfaces has found a decrease in round trip time of ~15us on average. A performance gain is only seen when going out of and back into the guest often and quickly, otherwise there is no net benefit from the polling. The polling interval is adjusted such that when we are often scheduled out for long periods of time it is reduced, and when we often poll successfully it is increased. The rate at which the polling interval increases or decreases, and the maximum polling interval, can be set through module parameters.
Based on the implementation in the generic kvm module by Wanpeng Li and Paolo Bonzini, and on direction from Paul Mackerras.
---
Change Log:
V4 -> V5:
- Add single_task_running() check to polling loop
--- arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c | 116 ++++++++++++++++++++++++++++++---- arch/powerpc/kvm/trace_hv.h | 22 +++++++ 4 files changed, 126 insertions(+), 14 deletions(-)
arch/powerpc/include/asm/kvm_book3s.h +1 -0
@@ -102,6 +102,7 @@ struct kvmppc_vcore {ulong pcr;ulong dpdes;/* doorbell state (POWER8) */ ulong conferring_threads; +unsigned int halt_poll_ns; };struct kvmppc_vcpu_book3s {
arch/powerpc/include/asm/kvm_host.h +1 -0
@@ -294,6 +294,7 @@ struct kvm_arch {#define VCORE_SLEEPING 3#define VCORE_RUNNING 4#define VCORE_EXITING 5 +#define VCORE_POLLING 6/* * Struct used to manage memory for a virtual processor area
arch/powerpc/kvm/book3s_hv.c +102 -14
146 lines not on this page · raw message
arch/powerpc/kvm/trace_hv.h +22 -0
@@ -432,6 +432,28 @@ TRACE_EVENT(kvmppc_vcore_blocked, __entry->runner_vcpu, __entry->n_runnable, __entry->tgid) ); +TRACE_EVENT (kvmppc_vcore_wakeup, + TP_PROTO(int do_sleep, __u64 ns), + +TP_ARGS (do_sleep, ns), + +TP_STRUCT__entry ( + __field(__u64, ns) + __field(int, waited) +__field (pid_t, tgid) + ), + +TP_fast_assign ( + __entry->ns = ns; + __entry->waited = do_sleep; + __entry->tgid = current->tgid; + ), + +TP_printk ("%s time %lld ns, tgid=%d" , + __entry->waited ?"wait" :"poll" , + __entry->ns, __entry->tgid) +); + TRACE_EVENT(kvmppc_run_vcpu_enter, TP_PROTO(struct kvm_vcpu *vcpu),
Signature · 1 line
2.5.5
PATCH RESEND v5 4/5 kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats
In reply to Suraj Jitindar Singhvms and vcpus have statistics associated with them which can be viewed within the debugfs. Currently it is assumed within the vcpu_stat_get() and vm_stat_get() functions that all of these statistics are represented as u32s, however the next patch adds some u64 vcpu statistics.
Change all vcpu statistics to u64 and modify vcpu_stat_get() accordingly. Since vcpu statistics are per vcpu, they will only be updated by a single vcpu at a time so this shouldn't present a problem on 32-bit machines which can't atomically increment 64-bit numbers. However vm statistics could potentially be updated by multiple vcpus from that vm at a time. To avoid the overhead of atomics make all vm statistics ulong such that they are 64-bit on 64-bit systems where they can be atomically incremented and are 32-bit on 32-bit systems which may not be able to atomically increment 64-bit numbers. Modify vm_stat_get() to expect ulongs.
---
Change Log:
V2 -> V3:
- Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Thus update all vm and vcpu statistics to u64s accordingly.
V3 -> V4:
- Change vm_stats from u64 to ulong
--- arch/arm/include/asm/kvm_host.h | 12 ++-- arch/arm64/include/asm/kvm_host.h | 12 ++-- arch/mips/include/asm/kvm_host.h | 46 ++++++------- arch/powerpc/include/asm/kvm_host.h | 60 ++++++++--------- arch/s390/include/asm/kvm_host.h | 128 ++++++++++++++++++------------------ arch/x86/include/asm/kvm_host.h | 72 ++++++++++---------- virt/kvm/kvm_main.c | 4 +- 7 files changed, 167 insertions(+), 167 deletions(-)
arch/arm/include/asm/kvm_host.h +6 -6
@@ -183,15 +183,15 @@ struct kvm_vcpu_arch { };struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;
arch/arm64/include/asm/kvm_host.h +6 -6
@@ -291,15 +291,15 @@ struct kvm_vcpu_arch {#endif struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;
arch/mips/include/asm/kvm_host.h +23 -23
55 lines not on this page · raw message
arch/powerpc/include/asm/kvm_host.h +30 -30
71 lines not on this page · raw message
arch/s390/include/asm/kvm_host.h +64 -64
140 lines not on this page · raw message
arch/x86/include/asm/kvm_host.h +36 -36
81 lines not on this page · raw message
virt/kvm/kvm_main.c +2 -2
@@ -3531,7 +3531,7 @@ static int vm_stat_get_per_vm(void *data, u64 *val) {struct kvm_stat_data *stat_data = (struct kvm_stat_data *)data; - *val = *(u32 *)((void *)stat_data->kvm + stat_data->offset); + *val = *(ulong *)((void *)stat_data->kvm + stat_data->offset);return 0 ; }
@@ -3561,7 +3561,7 @@ static int vcpu_stat_get_per_vm(void *data, u64 *val) *val =0 ;kvm_for_each_vcpu (i, vcpu, stat_data->kvm) - *val += *(u32 *)((void *)vcpu + stat_data->offset); + *val += *(u64 *)((void *)vcpu + stat_data->offset);return 0 ; }
Signature · 1 line
2.5.5
PATCH RESEND v5 5/5 powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats
In reply to Suraj Jitindar Singhvcpu stats are used to collect information about a vcpu which can be viewed in the debugfs. For example halt_attempted_poll and halt_successful_poll are used to keep track of the number of times the vcpu attempts to and successfully polls. These stats are currently not used on powerpc.
Implement incrementation of the halt_attempted_poll and halt_successful_poll vcpu stats for powerpc. Since these stats are summed over all the vcpus for all running guests it doesn't matter which vcpu they are attributed to, thus we choose the current runner vcpu of the vcore.
Also add new vcpu stats: halt_poll_success_ns, halt_poll_fail_ns and halt_wait_ns to be used to accumulate the total time spend polling successfully, polling unsuccessfully and waiting respectively, and halt_successful_wait to accumulate the number of times the vcpu waits. Given that halt_poll_success_ns, halt_poll_fail_ns and halt_wait_ns are expressed in nanoseconds it is necessary to represent these as 64-bit quantities, otherwise they would overflow after only about 4 seconds.
Given that the total time spend either polling or waiting will be known and the number of times that each was done, it will be possible to determine the average poll and wait times. This will give the ability to tune the kvm module parameters based on the calculated average wait and poll times.
---
Change Log:
V3 -> V4:
- Instead of accounting just wait and poll time, separate these into successful_poll_time, failed_poll_time and wait_time.
--- arch/powerpc/include/asm/kvm_host.h | 4 ++++ arch/powerpc/kvm/book3s.c | 4 ++++ arch/powerpc/kvm/book3s_hv.c | 36 +++++++++++++++++++++++++++++++----- 3 files changed, 39 insertions(+), 5 deletions(-)
arch/powerpc/include/asm/kvm_host.h +4 -0
@@ -114,8 +114,12 @@ struct kvm_vcpu_stat {u64 emulated_inst_exits;u64 dec_exits;u64 ext_intr_exits; +u64 halt_poll_success_ns; +u64 halt_poll_fail_ns; +u64 halt_wait_ns;u64 halt_successful_poll;u64 halt_attempted_poll; +u64 halt_successful_wait;u64 halt_poll_invalid;u64 halt_wakeup;u64 dbell_exits;
arch/powerpc/kvm/book3s.c +4 -0
@@ -52,8 +52,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { { "dec", VCPU_STAT(dec_exits) }, { "ext_intr", VCPU_STAT(ext_intr_exits) }, { "queue_intr", VCPU_STAT(queue_intr) }, + { "halt_poll_success_ns", VCPU_STAT(halt_poll_success_ns) }, + { "halt_poll_fail_ns", VCPU_STAT(halt_poll_fail_ns) }, + { "halt_wait_ns", VCPU_STAT(halt_wait_ns) }, { "halt_successful_poll", VCPU_STAT(halt_successful_poll), }, { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll), }, + { "halt_successful_wait", VCPU_STAT(halt_successful_wait) }, { "halt_poll_invalid", VCPU_STAT(halt_poll_invalid) }, { "halt_wakeup", VCPU_STAT(halt_wakeup) }, { "pf_storage", VCPU_STAT(pf_storage) },
arch/powerpc/kvm/book3s_hv.c +28 -5
@@ -2679,15 +2679,16 @@ static int kvmppc_vcore_check_block(struct kvmppc_vcore *vc)*/ static void kvmppc_vcore_blocked (struct kvmppc_vcore *vc) { +ktime_t cur, start_poll, start_wait;int do_sleep =1 ; -ktime_t cur, start;u64 block_ns;DECLARE_SWAITQUEUE (wait);/* Poll for pending exceptions and ceded state */ - cur = start =ktime_get (); + cur = start_poll =ktime_get ();if (vc->halt_poll_ns) { -ktime_t stop =ktime_add_ns (start, vc->halt_poll_ns); +ktime_t stop =ktime_add_ns (start_poll, vc->halt_poll_ns); + ++vc->runner->stat.halt_attempted_poll; vc->vcore_state =VCORE_POLLING ;spin_unlock (&vc->lock);
@@ -2703,8 +2704,10 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)spin_lock (&vc->lock); vc->vcore_state =VCORE_INACTIVE ; -if (!do_sleep) +if (!do_sleep) { + ++vc->runner->stat.halt_successful_poll; goto out; + } }prepare_to_swait (&vc->wq, &wait,TASK_INTERRUPTIBLE );
@@ -2712,9 +2715,14 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)if (kvmppc_vcore_check_block (vc)) {finish_swait (&vc->wq, &wait); do_sleep =0 ; +/* If we polled, count this as a successful poll */ +if (vc->halt_poll_ns) + ++vc->runner->stat.halt_successful_poll; goto out; } + start_wait =ktime_get (); + vc->vcore_state =VCORE_SLEEPING ;trace_kvmppc_vcore_blocked (vc,0 );spin_unlock (&vc->lock);
@@ -2723,11 +2731,29 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)spin_lock (&vc->lock); vc->vcore_state =VCORE_INACTIVE ;trace_kvmppc_vcore_blocked (vc,1 ); + ++vc->runner->stat.halt_successful_wait; cur =ktime_get (); out: - block_ns =ktime_to_ns (cur) -ktime_to_ns (start); + block_ns =ktime_to_ns (cur) -ktime_to_ns (start_poll); + +/* Attribute wait time */ +if (do_sleep) { + vc->runner->stat.halt_wait_ns ++ ktime_to_ns(cur) - ktime_to_ns(start_wait); +/* Attribute failed poll time */ +if (vc->halt_poll_ns) + vc->runner->stat.halt_poll_fail_ns ++ ktime_to_ns(start_wait) - +ktime_to_ns (start_poll); + }else { +/* Attribute successful poll time */ +if (vc->halt_poll_ns) + vc->runner->stat.halt_poll_success_ns ++ ktime_to_ns(cur) - +ktime_to_ns (start_poll); + }/* Adjust poll time */ if (halt_poll_max_ns) {
Signature · 1 line
2.5.5
Re: [RESEND] [PATCH V5 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats
In reply to Suraj Jitindar SinghPaolo (and others),
Are you OK with me taking the patch below via my kvm-ppc-next tree?
Thanks,
Paul.
Quoted 487 lines · Suraj Jitindar Singh
vms and vcpus have statistics associated with them which can be viewed within the debugfs. Currently it is assumed within the
vcpu_stat_get()andvm_stat_get()functions that all of these statistics are represented as u32s, however the next patch adds some u64 vcpu statistics.Change all vcpu statistics to u64 and modify
vcpu_stat_get()accordingly. Since vcpu statistics are per vcpu, they will only be updated by a single vcpu at a time so this shouldn't present a problem on 32-bit machines which can't atomically increment 64-bit numbers. However vm statistics could potentially be updated by multiple vcpus from that vm at a time. To avoid the overhead of atomics make all vm statistics ulong such that they are 64-bit on 64-bit systems where they can be atomically incremented and are 32-bit on 32-bit systems which may not be able to atomically increment 64-bit numbers. Modifyvm_stat_get()to expect ulongs.Signed-off-by Suraj Jitindar Singh <[email protected]>Reviewed-by David Matlack <[email protected]>---
Change Log:V2 -> V3:
- Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Thus update all vm and vcpu statistics to u64s accordingly.
V3 -> V4:
- Changevm_statsfrom u64 to ulong--- arch/arm/include/asm/kvm_host.h | 12 ++-- arch/arm64/include/asm/kvm_host.h | 12 ++-- arch/mips/include/asm/kvm_host.h | 46 ++++++------- arch/powerpc/include/asm/kvm_host.h | 60 ++++++++--------- arch/s390/include/asm/kvm_host.h | 128 ++++++++++++++++++------------------ arch/x86/include/asm/kvm_host.h | 72 ++++++++++---------- virt/kvm/kvm_main.c | 4 +- 7 files changed, 167 insertions(+), 167 deletions(-)arch/arm/include/asm/kvm_host.h +6
-6@@ -183,15 +183,15 @@ struct kvm_vcpu_arch { };struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;arch/arm64/include/asm/kvm_host.h +6
-6@@ -291,15 +291,15 @@ struct kvm_vcpu_arch {#endif struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;arch/mips/include/asm/kvm_host.h +23
-23@@ -98,32 +98,32 @@ extern void (*kvm_mips_release_pfn_clean)(kvm_pfn_t pfn);extern bool (*kvm_mips_is_error_pfn)(kvm_pfn_t pfn);struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 wait_exits; -u32 cache_exits; -u32 signal_exits; -u32 int_exits; -u32 cop_unusable_exits; -u32 tlbmod_exits; -u32 tlbmiss_ld_exits; -u32 tlbmiss_st_exits; -u32 addrerr_st_exits; -u32 addrerr_ld_exits; -u32 syscall_exits; -u32 resvd_inst_exits; -u32 break_inst_exits; -u32 trap_inst_exits; -u32 msa_fpe_exits; -u32 fpe_exits; -u32 msa_disabled_exits; -u32 flush_dcache_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; +u64 wait_exits; +u64 cache_exits; +u64 signal_exits; +u64 int_exits; +u64 cop_unusable_exits; +u64 tlbmod_exits; +u64 tlbmiss_ld_exits; +u64 tlbmiss_st_exits; +u64 addrerr_st_exits; +u64 addrerr_ld_exits; +u64 syscall_exits; +u64 resvd_inst_exits; +u64 break_inst_exits; +u64 trap_inst_exits; +u64 msa_fpe_exits; +u64 fpe_exits; +u64 msa_disabled_exits; +u64 flush_dcache_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; };enum kvm_mips_exit_types {arch/powerpc/include/asm/kvm_host.h +30
-30@@ -95,41 +95,41 @@ struct kvmppc_vcpu_book3s;struct kvmppc_book3s_shadow_vcpu ;struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 sum_exits; -u32 mmio_exits; -u32 signal_exits; -u32 light_exits; +u64 sum_exits; +u64 mmio_exits; +u64 signal_exits; +u64 light_exits;/* Account for special types of light exits: */ -u32 itlb_real_miss_exits; -u32 itlb_virt_miss_exits; -u32 dtlb_real_miss_exits; -u32 dtlb_virt_miss_exits; -u32 syscall_exits; -u32 isi_exits; -u32 dsi_exits; -u32 emulated_inst_exits; -u32 dec_exits; -u32 ext_intr_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 dbell_exits; -u32 gdbell_exits; -u32 ld; -u32 st; +u64 itlb_real_miss_exits; +u64 itlb_virt_miss_exits; +u64 dtlb_real_miss_exits; +u64 dtlb_virt_miss_exits; +u64 syscall_exits; +u64 isi_exits; +u64 dsi_exits; +u64 emulated_inst_exits; +u64 dec_exits; +u64 ext_intr_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 dbell_exits; +u64 gdbell_exits; +u64 ld; +u64 st;#ifdef CONFIG_PPC_BOOK3S -u32 pf_storage; -u32 pf_instruc; -u32 sp_storage; -u32 sp_instruc; -u32 queue_intr; -u32 ld_slow; -u32 st_slow; +u64 pf_storage; +u64 pf_instruc; +u64 sp_storage; +u64 sp_instruc; +u64 queue_intr; +u64 ld_slow; +u64 st_slow;#endif };arch/s390/include/asm/kvm_host.h +64
-64@@ -238,69 +238,69 @@ struct sie_page { } __packed;struct kvm_vcpu_stat { -u32 exit_userspace; -u32 exit_null; -u32 exit_external_request; -u32 exit_external_interrupt; -u32 exit_stop_request; -u32 exit_validity; -u32 exit_instruction; -u32 exit_pei; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 instruction_lctl; -u32 instruction_lctlg; -u32 instruction_stctl; -u32 instruction_stctg; -u32 exit_program_interruption; -u32 exit_instr_and_program; -u32 deliver_external_call; -u32 deliver_emergency_signal; -u32 deliver_service_signal; -u32 deliver_virtio_interrupt; -u32 deliver_stop_signal; -u32 deliver_prefix_signal; -u32 deliver_restart_signal; -u32 deliver_program_int; -u32 deliver_io_int; -u32 exit_wait_state; -u32 instruction_pfmf; -u32 instruction_stidp; -u32 instruction_spx; -u32 instruction_stpx; -u32 instruction_stap; -u32 instruction_storage_key; -u32 instruction_ipte_interlock; -u32 instruction_stsch; -u32 instruction_chsc; -u32 instruction_stsi; -u32 instruction_stfl; -u32 instruction_tprot; -u32 instruction_essa; -u32 instruction_sigp_sense; -u32 instruction_sigp_sense_running; -u32 instruction_sigp_external_call; -u32 instruction_sigp_emergency; -u32 instruction_sigp_cond_emergency; -u32 instruction_sigp_start; -u32 instruction_sigp_stop; -u32 instruction_sigp_stop_store_status; -u32 instruction_sigp_store_status; -u32 instruction_sigp_store_adtl_status; -u32 instruction_sigp_arch; -u32 instruction_sigp_prefix; -u32 instruction_sigp_restart; -u32 instruction_sigp_init_cpu_reset; -u32 instruction_sigp_cpu_reset; -u32 instruction_sigp_unknown; -u32 diagnose_10; -u32 diagnose_44; -u32 diagnose_9c; -u32 diagnose_258; -u32 diagnose_308; -u32 diagnose_500; +u64 exit_userspace; +u64 exit_null; +u64 exit_external_request; +u64 exit_external_interrupt; +u64 exit_stop_request; +u64 exit_validity; +u64 exit_instruction; +u64 exit_pei; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 instruction_lctl; +u64 instruction_lctlg; +u64 instruction_stctl; +u64 instruction_stctg; +u64 exit_program_interruption; +u64 exit_instr_and_program; +u64 deliver_external_call; +u64 deliver_emergency_signal; +u64 deliver_service_signal; +u64 deliver_virtio_interrupt; +u64 deliver_stop_signal; +u64 deliver_prefix_signal; +u64 deliver_restart_signal; +u64 deliver_program_int; +u64 deliver_io_int; +u64 exit_wait_state; +u64 instruction_pfmf; +u64 instruction_stidp; +u64 instruction_spx; +u64 instruction_stpx; +u64 instruction_stap; +u64 instruction_storage_key; +u64 instruction_ipte_interlock; +u64 instruction_stsch; +u64 instruction_chsc; +u64 instruction_stsi; +u64 instruction_stfl; +u64 instruction_tprot; +u64 instruction_essa; +u64 instruction_sigp_sense; +u64 instruction_sigp_sense_running; +u64 instruction_sigp_external_call; +u64 instruction_sigp_emergency; +u64 instruction_sigp_cond_emergency; +u64 instruction_sigp_start; +u64 instruction_sigp_stop; +u64 instruction_sigp_stop_store_status; +u64 instruction_sigp_store_status; +u64 instruction_sigp_store_adtl_status; +u64 instruction_sigp_arch; +u64 instruction_sigp_prefix; +u64 instruction_sigp_restart; +u64 instruction_sigp_init_cpu_reset; +u64 instruction_sigp_cpu_reset; +u64 instruction_sigp_unknown; +u64 diagnose_10; +u64 diagnose_44; +u64 diagnose_9c; +u64 diagnose_258; +u64 diagnose_308; +u64 diagnose_500; };#define PGM_OPERATION 0x01@@ -563,7 +563,7 @@ struct kvm_vcpu_arch { };struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_arch_memory_slot {arch/x86/include/asm/kvm_host.h +36
-36@@ -782,45 +782,45 @@ struct kvm_arch { };struct kvm_vm_stat { -u32 mmu_shadow_zapped; -u32 mmu_pte_write; -u32 mmu_pte_updated; -u32 mmu_pde_zapped; -u32 mmu_flooded; -u32 mmu_recycled; -u32 mmu_cache_miss; -u32 mmu_unsync; -u32 remote_tlb_flush; -u32 lpages; +ulong mmu_shadow_zapped; +ulong mmu_pte_write; +ulong mmu_pte_updated; +ulong mmu_pde_zapped; +ulong mmu_flooded; +ulong mmu_recycled; +ulong mmu_cache_miss; +ulong mmu_unsync; +ulong remote_tlb_flush; +ulong lpages; };struct kvm_vcpu_stat { -u32 pf_fixed; -u32 pf_guest; -u32 tlb_flush; -u32 invlpg; - -u32 exits; -u32 io_exits; -u32 mmio_exits; -u32 signal_exits; -u32 irq_window_exits; -u32 nmi_window_exits; -u32 halt_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 request_irq_exits; -u32 irq_exits; -u32 host_state_reload; -u32 efer_reload; -u32 fpu_reload; -u32 insn_emulation; -u32 insn_emulation_fail; -u32 hypercalls; -u32 irq_injections; -u32 nmi_injections; +u64 pf_fixed; +u64 pf_guest; +u64 tlb_flush; +u64 invlpg; + +u64 exits; +u64 io_exits; +u64 mmio_exits; +u64 signal_exits; +u64 irq_window_exits; +u64 nmi_window_exits; +u64 halt_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 request_irq_exits; +u64 irq_exits; +u64 host_state_reload; +u64 efer_reload; +u64 fpu_reload; +u64 insn_emulation; +u64 insn_emulation_fail; +u64 hypercalls; +u64 irq_injections; +u64 nmi_injections; };struct x86_instruction_info ;virt/kvm/kvm_main.c +2
-2@@ -3531,7 +3531,7 @@ static int vm_stat_get_per_vm(void *data, u64 *val) {struct kvm_stat_data *stat_data = (struct kvm_stat_data *)data; - *val = *(u32 *)((void *)stat_data->kvm + stat_data->offset); + *val = *(ulong *)((void *)stat_data->kvm + stat_data->offset);return 0 ; }@@ -3561,7 +3561,7 @@ static int vcpu_stat_get_per_vm(void *data, u64 *val) *val =0 ;kvm_for_each_vcpu (i, vcpu, stat_data->kvm) - *val += *(u32 *)((void *)vcpu + stat_data->offset); + *val += *(u64 *)((void *)vcpu + stat_data->offset);return 0 ; }Signature · 6 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH V5 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats
Quoted 3 lines · Paul Mackerras
Paolo (and others),
Are you OK with me taking the patch below via my kvm-ppc-next tree?
Ok for the s390 part.
Paolo Bonzini
maintainerRe: [RESEND] [PATCH V5 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats
In reply to Paul MackerrasQuoted 3 lines · Paul Mackerras
Paolo (and others),
Are you OK with me taking the patch below via my kvm-ppc-next tree?
Yes, but send a pull request to me as soon as possible, without waiting just before the merge window.
Thanks,
Paolo
Quoted 491 lines
Thanks,
Paul.Quoted 487 lines · Suraj Jitindar Singh
vms and vcpus have statistics associated with them which can be viewed within the debugfs. Currently it is assumed within the
vcpu_stat_get()andvm_stat_get()functions that all of these statistics are represented as u32s, however the next patch adds some u64 vcpu statistics.Change all vcpu statistics to u64 and modify
vcpu_stat_get()accordingly. Since vcpu statistics are per vcpu, they will only be updated by a single vcpu at a time so this shouldn't present a problem on 32-bit machines which can't atomically increment 64-bit numbers. However vm statistics could potentially be updated by multiple vcpus from that vm at a time. To avoid the overhead of atomics make all vm statistics ulong such that they are 64-bit on 64-bit systems where they can be atomically incremented and are 32-bit on 32-bit systems which may not be able to atomically increment 64-bit numbers. Modifyvm_stat_get()to expect ulongs.Signed-off-by Suraj Jitindar Singh <[email protected]>Reviewed-by David Matlack <[email protected]>---
Change Log:V2 -> V3:
- Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Thus update all vm and vcpu statistics to u64s accordingly.
V3 -> V4:
- Changevm_statsfrom u64 to ulong--- arch/arm/include/asm/kvm_host.h | 12 ++-- arch/arm64/include/asm/kvm_host.h | 12 ++-- arch/mips/include/asm/kvm_host.h | 46 ++++++------- arch/powerpc/include/asm/kvm_host.h | 60 ++++++++--------- arch/s390/include/asm/kvm_host.h | 128 ++++++++++++++++++------------------ arch/x86/include/asm/kvm_host.h | 72 ++++++++++---------- virt/kvm/kvm_main.c | 4 +- 7 files changed, 167 insertions(+), 167 deletions(-)arch/arm/include/asm/kvm_host.h +6
-6@@ -183,15 +183,15 @@ struct kvm_vcpu_arch { };struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;arch/arm64/include/asm/kvm_host.h +6
-6@@ -291,15 +291,15 @@ struct kvm_vcpu_arch {#endif struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 hvc_exit_stat; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 hvc_exit_stat;u64 wfe_exit_stat;u64 wfi_exit_stat;u64 mmio_exit_user;arch/mips/include/asm/kvm_host.h +23
-23@@ -98,32 +98,32 @@ extern void (*kvm_mips_release_pfn_clean)(kvm_pfn_t pfn);extern bool (*kvm_mips_is_error_pfn)(kvm_pfn_t pfn);struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 wait_exits; -u32 cache_exits; -u32 signal_exits; -u32 int_exits; -u32 cop_unusable_exits; -u32 tlbmod_exits; -u32 tlbmiss_ld_exits; -u32 tlbmiss_st_exits; -u32 addrerr_st_exits; -u32 addrerr_ld_exits; -u32 syscall_exits; -u32 resvd_inst_exits; -u32 break_inst_exits; -u32 trap_inst_exits; -u32 msa_fpe_exits; -u32 fpe_exits; -u32 msa_disabled_exits; -u32 flush_dcache_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; +u64 wait_exits; +u64 cache_exits; +u64 signal_exits; +u64 int_exits; +u64 cop_unusable_exits; +u64 tlbmod_exits; +u64 tlbmiss_ld_exits; +u64 tlbmiss_st_exits; +u64 addrerr_st_exits; +u64 addrerr_ld_exits; +u64 syscall_exits; +u64 resvd_inst_exits; +u64 break_inst_exits; +u64 trap_inst_exits; +u64 msa_fpe_exits; +u64 fpe_exits; +u64 msa_disabled_exits; +u64 flush_dcache_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; };enum kvm_mips_exit_types {arch/powerpc/include/asm/kvm_host.h +30
-30@@ -95,41 +95,41 @@ struct kvmppc_vcpu_book3s;struct kvmppc_book3s_shadow_vcpu ;struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_vcpu_stat { -u32 sum_exits; -u32 mmio_exits; -u32 signal_exits; -u32 light_exits; +u64 sum_exits; +u64 mmio_exits; +u64 signal_exits; +u64 light_exits;/* Account for special types of light exits: */ -u32 itlb_real_miss_exits; -u32 itlb_virt_miss_exits; -u32 dtlb_real_miss_exits; -u32 dtlb_virt_miss_exits; -u32 syscall_exits; -u32 isi_exits; -u32 dsi_exits; -u32 emulated_inst_exits; -u32 dec_exits; -u32 ext_intr_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 dbell_exits; -u32 gdbell_exits; -u32 ld; -u32 st; +u64 itlb_real_miss_exits; +u64 itlb_virt_miss_exits; +u64 dtlb_real_miss_exits; +u64 dtlb_virt_miss_exits; +u64 syscall_exits; +u64 isi_exits; +u64 dsi_exits; +u64 emulated_inst_exits; +u64 dec_exits; +u64 ext_intr_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 dbell_exits; +u64 gdbell_exits; +u64 ld; +u64 st;#ifdef CONFIG_PPC_BOOK3S -u32 pf_storage; -u32 pf_instruc; -u32 sp_storage; -u32 sp_instruc; -u32 queue_intr; -u32 ld_slow; -u32 st_slow; +u64 pf_storage; +u64 pf_instruc; +u64 sp_storage; +u64 sp_instruc; +u64 queue_intr; +u64 ld_slow; +u64 st_slow;#endif };arch/s390/include/asm/kvm_host.h +64
-64@@ -238,69 +238,69 @@ struct sie_page { } __packed;struct kvm_vcpu_stat { -u32 exit_userspace; -u32 exit_null; -u32 exit_external_request; -u32 exit_external_interrupt; -u32 exit_stop_request; -u32 exit_validity; -u32 exit_instruction; -u32 exit_pei; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 instruction_lctl; -u32 instruction_lctlg; -u32 instruction_stctl; -u32 instruction_stctg; -u32 exit_program_interruption; -u32 exit_instr_and_program; -u32 deliver_external_call; -u32 deliver_emergency_signal; -u32 deliver_service_signal; -u32 deliver_virtio_interrupt; -u32 deliver_stop_signal; -u32 deliver_prefix_signal; -u32 deliver_restart_signal; -u32 deliver_program_int; -u32 deliver_io_int; -u32 exit_wait_state; -u32 instruction_pfmf; -u32 instruction_stidp; -u32 instruction_spx; -u32 instruction_stpx; -u32 instruction_stap; -u32 instruction_storage_key; -u32 instruction_ipte_interlock; -u32 instruction_stsch; -u32 instruction_chsc; -u32 instruction_stsi; -u32 instruction_stfl; -u32 instruction_tprot; -u32 instruction_essa; -u32 instruction_sigp_sense; -u32 instruction_sigp_sense_running; -u32 instruction_sigp_external_call; -u32 instruction_sigp_emergency; -u32 instruction_sigp_cond_emergency; -u32 instruction_sigp_start; -u32 instruction_sigp_stop; -u32 instruction_sigp_stop_store_status; -u32 instruction_sigp_store_status; -u32 instruction_sigp_store_adtl_status; -u32 instruction_sigp_arch; -u32 instruction_sigp_prefix; -u32 instruction_sigp_restart; -u32 instruction_sigp_init_cpu_reset; -u32 instruction_sigp_cpu_reset; -u32 instruction_sigp_unknown; -u32 diagnose_10; -u32 diagnose_44; -u32 diagnose_9c; -u32 diagnose_258; -u32 diagnose_308; -u32 diagnose_500; +u64 exit_userspace; +u64 exit_null; +u64 exit_external_request; +u64 exit_external_interrupt; +u64 exit_stop_request; +u64 exit_validity; +u64 exit_instruction; +u64 exit_pei; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 instruction_lctl; +u64 instruction_lctlg; +u64 instruction_stctl; +u64 instruction_stctg; +u64 exit_program_interruption; +u64 exit_instr_and_program; +u64 deliver_external_call; +u64 deliver_emergency_signal; +u64 deliver_service_signal; +u64 deliver_virtio_interrupt; +u64 deliver_stop_signal; +u64 deliver_prefix_signal; +u64 deliver_restart_signal; +u64 deliver_program_int; +u64 deliver_io_int; +u64 exit_wait_state; +u64 instruction_pfmf; +u64 instruction_stidp; +u64 instruction_spx; +u64 instruction_stpx; +u64 instruction_stap; +u64 instruction_storage_key; +u64 instruction_ipte_interlock; +u64 instruction_stsch; +u64 instruction_chsc; +u64 instruction_stsi; +u64 instruction_stfl; +u64 instruction_tprot; +u64 instruction_essa; +u64 instruction_sigp_sense; +u64 instruction_sigp_sense_running; +u64 instruction_sigp_external_call; +u64 instruction_sigp_emergency; +u64 instruction_sigp_cond_emergency; +u64 instruction_sigp_start; +u64 instruction_sigp_stop; +u64 instruction_sigp_stop_store_status; +u64 instruction_sigp_store_status; +u64 instruction_sigp_store_adtl_status; +u64 instruction_sigp_arch; +u64 instruction_sigp_prefix; +u64 instruction_sigp_restart; +u64 instruction_sigp_init_cpu_reset; +u64 instruction_sigp_cpu_reset; +u64 instruction_sigp_unknown; +u64 diagnose_10; +u64 diagnose_44; +u64 diagnose_9c; +u64 diagnose_258; +u64 diagnose_308; +u64 diagnose_500; };#define PGM_OPERATION 0x01@@ -563,7 +563,7 @@ struct kvm_vcpu_arch { };struct kvm_vm_stat { -u32 remote_tlb_flush; +ulong remote_tlb_flush; };struct kvm_arch_memory_slot {arch/x86/include/asm/kvm_host.h +36
-36@@ -782,45 +782,45 @@ struct kvm_arch { };struct kvm_vm_stat { -u32 mmu_shadow_zapped; -u32 mmu_pte_write; -u32 mmu_pte_updated; -u32 mmu_pde_zapped; -u32 mmu_flooded; -u32 mmu_recycled; -u32 mmu_cache_miss; -u32 mmu_unsync; -u32 remote_tlb_flush; -u32 lpages; +ulong mmu_shadow_zapped; +ulong mmu_pte_write; +ulong mmu_pte_updated; +ulong mmu_pde_zapped; +ulong mmu_flooded; +ulong mmu_recycled; +ulong mmu_cache_miss; +ulong mmu_unsync; +ulong remote_tlb_flush; +ulong lpages; };struct kvm_vcpu_stat { -u32 pf_fixed; -u32 pf_guest; -u32 tlb_flush; -u32 invlpg; - -u32 exits; -u32 io_exits; -u32 mmio_exits; -u32 signal_exits; -u32 irq_window_exits; -u32 nmi_window_exits; -u32 halt_exits; -u32 halt_successful_poll; -u32 halt_attempted_poll; -u32 halt_poll_invalid; -u32 halt_wakeup; -u32 request_irq_exits; -u32 irq_exits; -u32 host_state_reload; -u32 efer_reload; -u32 fpu_reload; -u32 insn_emulation; -u32 insn_emulation_fail; -u32 hypercalls; -u32 irq_injections; -u32 nmi_injections; +u64 pf_fixed; +u64 pf_guest; +u64 tlb_flush; +u64 invlpg; + +u64 exits; +u64 io_exits; +u64 mmio_exits; +u64 signal_exits; +u64 irq_window_exits; +u64 nmi_window_exits; +u64 halt_exits; +u64 halt_successful_poll; +u64 halt_attempted_poll; +u64 halt_poll_invalid; +u64 halt_wakeup; +u64 request_irq_exits; +u64 irq_exits; +u64 host_state_reload; +u64 efer_reload; +u64 fpu_reload; +u64 insn_emulation; +u64 insn_emulation_fail; +u64 hypercalls; +u64 irq_injections; +u64 nmi_injections; };struct x86_instruction_info ;virt/kvm/kvm_main.c +2
-2@@ -3531,7 +3531,7 @@ static int vm_stat_get_per_vm(void *data, u64 *val) {struct kvm_stat_data *stat_data = (struct kvm_stat_data *)data; - *val = *(u32 *)((void *)stat_data->kvm + stat_data->offset); + *val = *(ulong *)((void *)stat_data->kvm + stat_data->offset);return 0 ; }@@ -3561,7 +3561,7 @@ static int vcpu_stat_get_per_vm(void *data, u64 *val) *val =0 ;kvm_for_each_vcpu (i, vcpu, stat_data->kvm) - *val += *(u32 *)((void *)vcpu + stat_data->offset); + *val += *(u64 *)((void *)vcpu + stat_data->offset);return 0 ; }Signature · 6 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html