qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Harivel <aharivel@redhat.com>
To: pbonzini@redhat.com, berrange@redhat.com
Cc: qemu-devel@nongnu.org, Anthony Harivel <aharivel@redhat.com>
Subject: [PATCH 0/2] Add AMD CPU for RAPL MSR support
Date: Thu, 13 Mar 2025 11:19:00 +0100	[thread overview]
Message-ID: <20250313101902.835556-1-aharivel@redhat.com> (raw)

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(-)

-- 
2.48.1



             reply	other threads:[~2025-03-13 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 10:19 Anthony Harivel [this message]
2025-03-13 10:19 ` [PATCH 1/2] target/i386/kvm: add AMD support for RAPL MSR Anthony Harivel
2025-03-13 10:19 ` [PATCH 2/2] target/i386/kvm: Change error_report() to tracepoint in vmsr_read_thread_stat() Anthony Harivel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250313101902.835556-1-aharivel@redhat.com \
    --to=aharivel@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).