mbox series

[0/2] Add AMD CPU for RAPL MSR support

Message ID 20250313101902.835556-1-aharivel@redhat.com (mailing list archive)
Headers show
Series Add AMD CPU for RAPL MSR support | expand

Message

Anthony Harivel March 13, 2025, 10:19 a.m. UTC
Hi,

The following patch add the support for AMD CPU for RAPL MSR. This was 
one of the two current limitation of the introduction patch.

This has been tested on AMD Ryzen 5850U. I was able to mount the RAPL 
driver in a VM with '-cpu host'. The counter value are increasing 
properly.

I added a second patch to silence an error that is not really an error. 
I change it to a tracepoint following Daniel advice. Thanks Daniel !

Thanks
Anthony

Anthony Harivel (2):
  target/i386/kvm: add AMD support for RAPL MSR
  target/i386/kvm: Change error_report() to tracepoint in
    vmsr_read_thread_stat()

 docs/specs/rapl-msr.rst       |  21 ++++---
 include/system/kvm_int.h      |   4 ++
 target/i386/cpu.h             |   2 +
 target/i386/kvm/kvm.c         | 111 ++++++++++++++++++++++------------
 target/i386/kvm/trace-events  |   3 +
 target/i386/kvm/vmsr_energy.c |  13 +++-
 target/i386/kvm/vmsr_energy.h |   1 +
 tools/i386/qemu-vmsr-helper.c |  47 ++++++++------
 tools/i386/rapl-msr-index.h   |   4 ++
 9 files changed, 139 insertions(+), 67 deletions(-)