[XTF PATCH v1 00/15] x86: add interrupt latency test

dmukhin@ford.com posted 15 patches 5 hours ago
arch/x86/hvm/traps.c                 |   7 +-
arch/x86/include/arch/apic.h         |  29 ++
arch/x86/include/arch/idt.h          |   7 +
arch/x86/include/arch/processor.h    |   3 +
arch/x86/include/arch/system.h       |   7 +
arch/x86/include/arch/time.h         |  48 ++
arch/x86/setup.c                     |  80 +--
arch/x86/tsc.c                       |  32 ++
build/files.mk                       |   3 +
build/gen.mk                         |   4 +-
build/mkinfo.py                      |   8 +-
common/libc/string.c                 |  24 +
common/statistics.c                  | 364 ++++++++++++++
common/time.c                        |   6 +
include/xen/arch-x86/cpuid.h         |  26 +
include/xen/domctl.h                 |  63 +++
include/xen/event_channel.h          |  13 +
include/xen/hvm/hvm_op.h             |  17 +
include/xtf/hypercall.h              |  31 ++
include/xtf/lib.h                    |   6 +-
include/xtf/libc.h                   |   2 +
include/xtf/statistics.h             |  23 +
include/xtf/time.h                   |   8 +
tests/argo/bootargs.in               |   1 +
tests/interrupt-latency/Makefile     |  11 +
tests/interrupt-latency/ap-asm.S     |  50 ++
tests/interrupt-latency/ap-main.c    | 164 +++++++
tests/interrupt-latency/ap.h         |  12 +
tests/interrupt-latency/bootargs.in  |   1 +
tests/interrupt-latency/extra.cfg.in |   1 +
tests/interrupt-latency/main.c       | 706 +++++++++++++++++++++++++++
31 files changed, 1711 insertions(+), 46 deletions(-)
create mode 100644 arch/x86/include/arch/system.h
create mode 100644 arch/x86/include/arch/time.h
create mode 100644 arch/x86/tsc.c
create mode 100644 common/statistics.c
create mode 100644 common/time.c
create mode 100644 include/xen/domctl.h
create mode 100644 include/xtf/statistics.h
create mode 100644 include/xtf/time.h
create mode 100644 tests/argo/bootargs.in
create mode 100644 tests/interrupt-latency/Makefile
create mode 100644 tests/interrupt-latency/ap-asm.S
create mode 100644 tests/interrupt-latency/ap-main.c
create mode 100644 tests/interrupt-latency/ap.h
create mode 100644 tests/interrupt-latency/bootargs.in
create mode 100644 tests/interrupt-latency/extra.cfg.in
create mode 100644 tests/interrupt-latency/main.c
[XTF PATCH v1 00/15] x86: add interrupt latency test
Posted by dmukhin@ford.com 5 hours ago
The series introduces updates to XTF to enable a test for measuring
IPI/posted interrupts latencies required by [1].

The test has lots of dependencies, so series grew big.

The series is available via gitlab branch [2].

Complete CI run is available via [3].

Patch 1 aligns Arm XTF with x86 XTF; does not affect x86 XTF runs.

Patch 2 enables per-test Xen configuration.

Patch 3 adds hypervisor cmdline into argo test artifacts.

Patch 4 ports ACCESS_ONCE() from Xen.

Patch 5 adds simple atou() for test command line parsing.

Patch 6 adds missing evtchn management hypercalls.

Patch 7 adds XEN_DOMCTL_debug_op hypercall.

Patch 8 adds minimal measuments sampling framework.

Patch 9 adds cpu_relax() for x86.

Patch 10 adds TSC-based time management.

Patch 11 and 12 are small updates for setting up test environment.

Patch 13 adds primitives for enabling/disabling interrupts.

Patch 14 adds few more APIC registers for tests.

Patch 15 adds the interrupt latency test.

[1] Xen AVIC + CI infra branch: https://gitlab.com/xen-project/people/dmukhin/xen/-/tree/svm-avic-v3?ref_type=heads
[2] XTF branch: https://gitlab.com/xen-project/people/dmukhin/xtf/-/tree/x86_64-ipi-latency?ref_type=heads
[3] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/3028917985

Denis Mukhin (15):
  common: account for installing *-sym files
  common: add per-test Xen bootargs file
  argo: export hypervisor command line for test
  common: harden type checks in ACCESS_ONCE()
  common: add simple atou()
  common: add missing evtchn hypercalls
  common: enable XEN_DOMCTL_debug_op domctl
  common: add primitives for measurements
  x86: introduce cpu_relax()
  x86: introduce simple time management
  x86: export per-vCPU IDTR initialization
  x86: isolate FEP in setup_fep()
  x86: add primitives for interrupt enable/disable
  x86: apic: add few more registers
  x86: add interrupt latency test (hvm64)

 arch/x86/hvm/traps.c                 |   7 +-
 arch/x86/include/arch/apic.h         |  29 ++
 arch/x86/include/arch/idt.h          |   7 +
 arch/x86/include/arch/processor.h    |   3 +
 arch/x86/include/arch/system.h       |   7 +
 arch/x86/include/arch/time.h         |  48 ++
 arch/x86/setup.c                     |  80 +--
 arch/x86/tsc.c                       |  32 ++
 build/files.mk                       |   3 +
 build/gen.mk                         |   4 +-
 build/mkinfo.py                      |   8 +-
 common/libc/string.c                 |  24 +
 common/statistics.c                  | 364 ++++++++++++++
 common/time.c                        |   6 +
 include/xen/arch-x86/cpuid.h         |  26 +
 include/xen/domctl.h                 |  63 +++
 include/xen/event_channel.h          |  13 +
 include/xen/hvm/hvm_op.h             |  17 +
 include/xtf/hypercall.h              |  31 ++
 include/xtf/lib.h                    |   6 +-
 include/xtf/libc.h                   |   2 +
 include/xtf/statistics.h             |  23 +
 include/xtf/time.h                   |   8 +
 tests/argo/bootargs.in               |   1 +
 tests/interrupt-latency/Makefile     |  11 +
 tests/interrupt-latency/ap-asm.S     |  50 ++
 tests/interrupt-latency/ap-main.c    | 164 +++++++
 tests/interrupt-latency/ap.h         |  12 +
 tests/interrupt-latency/bootargs.in  |   1 +
 tests/interrupt-latency/extra.cfg.in |   1 +
 tests/interrupt-latency/main.c       | 706 +++++++++++++++++++++++++++
 31 files changed, 1711 insertions(+), 46 deletions(-)
 create mode 100644 arch/x86/include/arch/system.h
 create mode 100644 arch/x86/include/arch/time.h
 create mode 100644 arch/x86/tsc.c
 create mode 100644 common/statistics.c
 create mode 100644 common/time.c
 create mode 100644 include/xen/domctl.h
 create mode 100644 include/xtf/statistics.h
 create mode 100644 include/xtf/time.h
 create mode 100644 tests/argo/bootargs.in
 create mode 100644 tests/interrupt-latency/Makefile
 create mode 100644 tests/interrupt-latency/ap-asm.S
 create mode 100644 tests/interrupt-latency/ap-main.c
 create mode 100644 tests/interrupt-latency/ap.h
 create mode 100644 tests/interrupt-latency/bootargs.in
 create mode 100644 tests/interrupt-latency/extra.cfg.in
 create mode 100644 tests/interrupt-latency/main.c

-- 
2.55.0