qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 1/1] target/i386: Fix arguments for vmsr_read_thread_stat()


From: Paolo Bonzini
Subject: [PULL 1/1] target/i386: Fix arguments for vmsr_read_thread_stat()
Date: Wed, 14 Aug 2024 18:44:32 +0200

From: Anthony Harivel <aharivel@redhat.com>

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: 20240807124320.1741124-2-aharivel@redhat.com">https://lore.kernel.org/r/20240807124320.1741124-2-aharivel@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/kvm/kvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 31f149c9902..2fa88ef1e37 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) {
-- 
2.46.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]