qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Add support for the RAPL MSRs series
@ 2024-03-18 15:12 Anthony Harivel
  2024-03-18 15:12 ` [PATCH v4 1/3] qio: add support for SO_PEERCRED for socket channel Anthony Harivel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Anthony Harivel @ 2024-03-18 15:12 UTC (permalink / raw)
  To: pbonzini, mtosatti, berrange
  Cc: qemu-devel, vchundur, rjarry, Anthony Harivel

Dear maintainers, 

First of all, thank you very much for your review of my patch 
[1].

In this version (v4), I have attempted to address all the problems 
addressed during the last review. I hope I did not forget anything.

I added more than 400 lines of code, I guess it's time we review that. 

However, one question remains unanswered from Friday 1 March pointing 
the issue with the location of "/var/local/run/qemu-vmsr-helper.sock", 
created by compute_default_paths(). QEMU is not allowed to reach the 
socket here.

Thank you again for your continued guidance. 

v3 -> v4
--------

- Correct memory leaks with AddressSanitizer  

- Add sanity check for QEMU and qemu-vmsr-helper for checking if host is 
  INTEL and if RAPL is activated.

- Rename poor variables naming for easier comprehension

- Move code that checks Host before creating the VMSR thread

- Get rid of libnuma: create function that read sysfs for reading the 
  Host topology instead

v2 -> v3
--------

- Move all memory allocations from Clib to Glib

- Compile on *BSD (working on Linux only)

- No more limitation on the virtual package: each vCPU that belongs to 
  the same virtual package is giving the same results like expected on 
  a real CPU.
  This has been tested topology like:
     -smp 4,sockets=2
     -smp 16,sockets=4,cores=2,threads=2

v1 -> v2
--------

- To overcome the CVE-2020-8694 a socket communication is created
  to a priviliged helper

- Add the priviliged helper (qemu-vmsr-helper)

- Add SO_PEERCRED in qio channel socket

RFC -> v1
---------

- Add vmsr_* in front of all vmsr specific function

- Change malloc()/calloc()... with all glib equivalent

- Pre-allocate all dynamic memories when possible

- Add a Documentation of implementation, limitation and usage

Best regards,
Anthony

[1]: https://lore.kernel.org/all/20240125072214.318382-1-aharivel@redhat.com/#t

Anthony Harivel (3):
  qio: add support for SO_PEERCRED for socket channel
  tools: build qemu-vmsr-helper
  Add support for RAPL MSRs in KVM/Qemu

 accel/kvm/kvm-all.c                      |  27 ++
 contrib/systemd/qemu-vmsr-helper.service |  15 +
 contrib/systemd/qemu-vmsr-helper.socket  |   9 +
 docs/specs/index.rst                     |   1 +
 docs/specs/rapl-msr.rst                  | 155 +++++++
 docs/tools/index.rst                     |   1 +
 docs/tools/qemu-vmsr-helper.rst          |  89 ++++
 include/io/channel.h                     |  21 +
 include/sysemu/kvm.h                     |   2 +
 include/sysemu/kvm_int.h                 |  30 ++
 io/channel-socket.c                      |  24 +
 io/channel.c                             |  12 +
 meson.build                              |   5 +
 target/i386/cpu.h                        |   8 +
 target/i386/kvm/kvm-cpu.c                |   7 +
 target/i386/kvm/kvm.c                    | 420 +++++++++++++++++
 target/i386/kvm/meson.build              |   1 +
 target/i386/kvm/vmsr_energy.c            | 381 +++++++++++++++
 target/i386/kvm/vmsr_energy.h            |  97 ++++
 tools/i386/qemu-vmsr-helper.c            | 564 +++++++++++++++++++++++
 tools/i386/rapl-msr-index.h              |  28 ++
 21 files changed, 1897 insertions(+)
 create mode 100644 contrib/systemd/qemu-vmsr-helper.service
 create mode 100644 contrib/systemd/qemu-vmsr-helper.socket
 create mode 100644 docs/specs/rapl-msr.rst
 create mode 100644 docs/tools/qemu-vmsr-helper.rst
 create mode 100644 target/i386/kvm/vmsr_energy.c
 create mode 100644 target/i386/kvm/vmsr_energy.h
 create mode 100644 tools/i386/qemu-vmsr-helper.c
 create mode 100644 tools/i386/rapl-msr-index.h

-- 
2.44.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-05  8:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 15:12 [PATCH v4 0/3] Add support for the RAPL MSRs series Anthony Harivel
2024-03-18 15:12 ` [PATCH v4 1/3] qio: add support for SO_PEERCRED for socket channel Anthony Harivel
2024-03-20 17:18   ` Daniel P. Berrangé
2024-03-18 15:12 ` [PATCH v4 2/3] tools: build qemu-vmsr-helper Anthony Harivel
2024-03-21 11:33   ` Daniel P. Berrangé
2024-03-28 10:27     ` Anthony Harivel
2024-03-28 10:46       ` Daniel P. Berrangé
2024-03-18 15:12 ` [PATCH v4 3/3] Add support for RAPL MSRs in KVM/Qemu Anthony Harivel
2024-03-21 13:35   ` Daniel P. Berrangé
2024-04-05  8:33     ` Anthony Harivel

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