Re: [PATCH v2 3/3] Add support for RAPL MSRs in KVM/Qemu

2023-11-01 Thread Paolo Bonzini
On 10/31/23 15:46, Anthony Harivel wrote: +/* Get QEMU PID*/ +pid = getpid(); This should be gettid(), or perhaps a VCPU thread's TID. +/* Those MSR values should not change as well */ +vmsr->msr_unit = vmsr_read_msr(MSR_RAPL_POWER_UNIT, 0, pid, +

Re: [PATCH v2 3/3] Add support for RAPL MSRs in KVM/Qemu

2023-11-01 Thread Daniel P . Berrangé
On Tue, Oct 31, 2023 at 03:46:03PM +0100, Anthony Harivel wrote: > Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL > interface (Running Average Power Limit) for advertising the accumulated > energy consumption of various power domains (e.g. CPU packages, DRAM, > etc.). > > T

[PATCH v2 3/3] Add support for RAPL MSRs in KVM/Qemu

2023-10-31 Thread Anthony Harivel
Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL interface (Running Average Power Limit) for advertising the accumulated energy consumption of various power domains (e.g. CPU packages, DRAM, etc.). The consumption is reported via MSRs (model specific registers) like MSR_PKG_E