aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Harivel <aharivel@redhat.com>2024-08-07 14:43:20 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-08-14 18:42:19 +0200
commita6e65975c3fac1b2f067fef8eeed92584d773f06 (patch)
tree62086ea633e85f723c0ce6e9ee625bc422623ee3
parent3ef11c991e501768f2fa646e8438f075be1cd2f5 (diff)
target/i386: Fix arguments for vmsr_read_thread_stat()
Snapshot of the stat utime and stime for each thread, taken before and after the pause, must be stored in separate locations Signed-off-by: Anthony Harivel <aharivel@redhat.com> Link: https://lore.kernel.org/r/20240807124320.1741124-2-aharivel@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--target/i386/kvm/kvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 31f149c990..2fa88ef1e3 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -2712,8 +2712,8 @@ static void *kvm_msr_energy_thread(void *data)
thd_stat[i].thread_id = thread_ids[i];
vmsr_read_thread_stat(vmsr->pid,
thd_stat[i].thread_id,
- thd_stat[i].utime,
- thd_stat[i].stime,
+ &thd_stat[i].utime[0],
+ &thd_stat[i].stime[0],
&thd_stat[i].cpu_id);
thd_stat[i].pkg_id =
vmsr_get_physical_package_id(thd_stat[i].cpu_id);
@@ -2777,8 +2777,8 @@ static void *kvm_msr_energy_thread(void *data)
for (int i = 0; i < num_threads; i++) {
vmsr_read_thread_stat(vmsr->pid,
thd_stat[i].thread_id,
- thd_stat[i].utime,
- thd_stat[i].stime,
+ &thd_stat[i].utime[1],
+ &thd_stat[i].stime[1],
&thd_stat[i].cpu_id);
if (vmsr->pid < 0) {