xen: Expose the PMU to the guests
authorMichal Orzel <michal.orzel@arm.com>
Wed, 13 Oct 2021 12:33:52 +0000 (14:33 +0200)
committerIan Jackson <iwj@xenproject.org>
Wed, 13 Oct 2021 14:10:38 +0000 (15:10 +0100)
commitdbb948110a0e23a8081882a980038e9c0f6aab88
treec168641cd3f8298e0fdf2202e42301cba1adca3a
parentc8c6cd9eee9aa98c696607adb9d1e422da161110
xen: Expose the PMU to the guests

Add parameter vpmu to xl domain configuration syntax
to enable the access to PMU registers by disabling
the PMU traps(currently only for ARM).

The current status is that the PMU registers are not
virtualized and the physical registers are directly
accessible when this parameter is enabled. There is no
interrupt support and Xen will not save/restore the
register values on context switches.

According to Arm Arm, section D7.1:
"The Performance Monitors Extension is common
to AArch64 operation and AArch32 operation."
That means we have an ensurance that if PMU is
present in one exception state, it must also be
present in the other.

Please note that this feature is experimental.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
15 files changed:
SUPPORT.md
docs/man/xl.cfg.5.pod.in
tools/golang/xenlight/helpers.gen.go
tools/golang/xenlight/types.gen.go
tools/include/libxl.h
tools/libs/light/libxl_create.c
tools/libs/light/libxl_types.idl
tools/ocaml/libs/xc/xenctrl.ml
tools/ocaml/libs/xc/xenctrl.mli
tools/xl/xl_parse.c
xen/arch/arm/domain.c
xen/arch/arm/setup.c
xen/common/domain.c
xen/include/asm-arm/domain.h
xen/include/public/domctl.h