1*84369d76SAnthony Harivel================================== 2*84369d76SAnthony HarivelQEMU virtual RAPL MSR helper 3*84369d76SAnthony Harivel================================== 4*84369d76SAnthony Harivel 5*84369d76SAnthony HarivelSynopsis 6*84369d76SAnthony Harivel-------- 7*84369d76SAnthony Harivel 8*84369d76SAnthony Harivel**qemu-vmsr-helper** [*OPTION*] 9*84369d76SAnthony Harivel 10*84369d76SAnthony HarivelDescription 11*84369d76SAnthony Harivel----------- 12*84369d76SAnthony Harivel 13*84369d76SAnthony HarivelImplements the virtual RAPL MSR helper for QEMU. 14*84369d76SAnthony Harivel 15*84369d76SAnthony HarivelAccessing the RAPL (Running Average Power Limit) MSR enables the RAPL powercap 16*84369d76SAnthony Hariveldriver to advertise and monitor the power consumption or accumulated energy 17*84369d76SAnthony Harivelconsumption of different power domains, such as CPU packages, DRAM, and other 18*84369d76SAnthony Harivelcomponents when available. 19*84369d76SAnthony Harivel 20*84369d76SAnthony HarivelHowever those register are accesible under priviliged access (CAP_SYS_RAWIO). 21*84369d76SAnthony HarivelQEMU can use an external helper to access those priviliged register. 22*84369d76SAnthony Harivel 23*84369d76SAnthony Harivel:program:`qemu-vmsr-helper` is that external helper; it creates a listener 24*84369d76SAnthony Harivelsocket which will accept incoming connections for communication with QEMU. 25*84369d76SAnthony Harivel 26*84369d76SAnthony HarivelIf you want to run VMs in a setup like this, this helper should be started as a 27*84369d76SAnthony Harivelsystem service, and you should read the QEMU manual section on "RAPL MSR 28*84369d76SAnthony Harivelsupport" to find out how to configure QEMU to connect to the socket created by 29*84369d76SAnthony Harivel:program:`qemu-vmsr-helper`. 30*84369d76SAnthony Harivel 31*84369d76SAnthony HarivelAfter connecting to the socket, :program:`qemu-vmsr-helper` can 32*84369d76SAnthony Hariveloptionally drop root privileges, except for those capabilities that 33*84369d76SAnthony Harivelare needed for its operation. 34*84369d76SAnthony Harivel 35*84369d76SAnthony Harivel:program:`qemu-vmsr-helper` can also use the systemd socket activation 36*84369d76SAnthony Harivelprotocol. In this case, the systemd socket unit should specify a 37*84369d76SAnthony HarivelUnix stream socket, like this:: 38*84369d76SAnthony Harivel 39*84369d76SAnthony Harivel [Socket] 40*84369d76SAnthony Harivel ListenStream=/var/run/qemu-vmsr-helper.sock 41*84369d76SAnthony Harivel 42*84369d76SAnthony HarivelOptions 43*84369d76SAnthony Harivel------- 44*84369d76SAnthony Harivel 45*84369d76SAnthony Harivel.. program:: qemu-vmsr-helper 46*84369d76SAnthony Harivel 47*84369d76SAnthony Harivel.. option:: -d, --daemon 48*84369d76SAnthony Harivel 49*84369d76SAnthony Harivel run in the background (and create a PID file) 50*84369d76SAnthony Harivel 51*84369d76SAnthony Harivel.. option:: -q, --quiet 52*84369d76SAnthony Harivel 53*84369d76SAnthony Harivel decrease verbosity 54*84369d76SAnthony Harivel 55*84369d76SAnthony Harivel.. option:: -v, --verbose 56*84369d76SAnthony Harivel 57*84369d76SAnthony Harivel increase verbosity 58*84369d76SAnthony Harivel 59*84369d76SAnthony Harivel.. option:: -f, --pidfile=PATH 60*84369d76SAnthony Harivel 61*84369d76SAnthony Harivel PID file when running as a daemon. By default the PID file 62*84369d76SAnthony Harivel is created in the system runtime state directory, for example 63*84369d76SAnthony Harivel :file:`/var/run/qemu-vmsr-helper.pid`. 64*84369d76SAnthony Harivel 65*84369d76SAnthony Harivel.. option:: -k, --socket=PATH 66*84369d76SAnthony Harivel 67*84369d76SAnthony Harivel path to the socket. By default the socket is created in 68*84369d76SAnthony Harivel the system runtime state directory, for example 69*84369d76SAnthony Harivel :file:`/var/run/qemu-vmsr-helper.sock`. 70*84369d76SAnthony Harivel 71*84369d76SAnthony Harivel.. option:: -T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE] 72*84369d76SAnthony Harivel 73*84369d76SAnthony Harivel .. include:: ../qemu-option-trace.rst.inc 74*84369d76SAnthony Harivel 75*84369d76SAnthony Harivel.. option:: -u, --user=USER 76*84369d76SAnthony Harivel 77*84369d76SAnthony Harivel user to drop privileges to 78*84369d76SAnthony Harivel 79*84369d76SAnthony Harivel.. option:: -g, --group=GROUP 80*84369d76SAnthony Harivel 81*84369d76SAnthony Harivel group to drop privileges to 82*84369d76SAnthony Harivel 83*84369d76SAnthony Harivel.. option:: -h, --help 84*84369d76SAnthony Harivel 85*84369d76SAnthony Harivel Display a help message and exit. 86*84369d76SAnthony Harivel 87*84369d76SAnthony Harivel.. option:: -V, --version 88*84369d76SAnthony Harivel 89*84369d76SAnthony Harivel Display version information and exit. 90