|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen: Drop xenoprofile support
Le 05/01/2026 à 21:01, Andrew Cooper a écrit :
> The most recent xenoprof change was 300ef0cb4fde ("x86: Add Xenoprofile
> support for AMD Family16h") in 2013, despite there being 42 changes worth of
> other cleanup/rearranging since then.
>
> Oprofile themselves dropped Xen support in commit 0c142c3a096d ("Remove
> opcontrol and the GUI and processor models dependent on it") in 2014, as part
> of releasing version 1.0 and switching over to using operf based on the Linux
> perf_event subsystem. Linux's version of this patch was merged in commit
> 24880bef417f ("Merge tag 'oprofile-removal-5.12'") in 2021.
>
> Drop xenoprof and all supporting infrastructure, including the hypercall, the
> XSM hook and flask vectors which lose their only caller, and even shrinks
> struct domain by one pointer which wasn't properly excluded in
> !CONFIG_XENOPROF builds.
>
> Retain the public xenoprof.h header as it is ABI, but note that the
> functionality is removed.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> CC: Michal Orzel <michal.orzel@xxxxxxx>
> CC: Jan Beulich <jbeulich@xxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> CC: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
>
> Despite appearing to be architecture neutral, the internals of Xenoprof were
> entirely x86-specific. Another curiosity is that only the VMX MSR hooks
> called passive_domain_do_{rd,wr}msr(), and I can't see how this was correct
> for SVM.
>
> The real reason for finally getting around to this is the number of MISRA
> violations reported by the eclair-x86_64-allcode job that I don't feel like
> fixing.
> ---
> CHANGELOG.md | 3 +
> docs/misc/xen-command-line.pandoc | 6 -
> tools/flask/policy/modules/dom0.te | 2 -
> xen/arch/x86/Makefile | 1 -
> xen/arch/x86/cpu/vpmu_amd.c | 7 -
> xen/arch/x86/cpu/vpmu_intel.c | 6 -
> xen/arch/x86/hvm/svm/entry.S | 1 -
> xen/arch/x86/hvm/svm/svm.c | 2 -
> xen/arch/x86/hvm/vmx/vmx.c | 9 -
> xen/arch/x86/include/asm/xenoprof.h | 95 ---
> xen/arch/x86/oprofile/Makefile | 6 -
> xen/arch/x86/oprofile/backtrace.c | 145 ----
> xen/arch/x86/oprofile/nmi_int.c | 485 ------------
> xen/arch/x86/oprofile/op_counter.h | 41 -
> xen/arch/x86/oprofile/op_model_athlon.c | 547 -------------
> xen/arch/x86/oprofile/op_model_p4.c | 721 -----------------
> xen/arch/x86/oprofile/op_model_ppro.c | 348 ---------
> xen/arch/x86/oprofile/op_x86_model.h | 58 --
> xen/arch/x86/oprofile/xenoprof.c | 106 ---
> xen/arch/x86/traps.c | 4 -
> xen/common/Kconfig | 11 -
> xen/common/Makefile | 1 -
> xen/common/compat/xenoprof.c | 42 -
> xen/common/domain.c | 6 -
> xen/common/xenoprof.c | 977 ------------------------
> xen/include/Makefile | 1 -
> xen/include/hypercall-defs.c | 6 -
> xen/include/public/xen.h | 2 +-
> xen/include/public/xenoprof.h | 2 +-
> xen/include/xen/sched.h | 3 -
> xen/include/xen/xenoprof.h | 49 --
> xen/include/xsm/dummy.h | 7 -
> xen/include/xsm/xsm.h | 7 -
> xen/xsm/dummy.c | 2 -
> xen/xsm/flask/hooks.c | 35 -
> xen/xsm/flask/policy/access_vectors | 4 -
> 36 files changed, 5 insertions(+), 3743 deletions(-)
> delete mode 100644 xen/arch/x86/include/asm/xenoprof.h
> delete mode 100644 xen/arch/x86/oprofile/Makefile
> delete mode 100644 xen/arch/x86/oprofile/backtrace.c
> delete mode 100644 xen/arch/x86/oprofile/nmi_int.c
> delete mode 100644 xen/arch/x86/oprofile/op_counter.h
> delete mode 100644 xen/arch/x86/oprofile/op_model_athlon.c
> delete mode 100644 xen/arch/x86/oprofile/op_model_p4.c
> delete mode 100644 xen/arch/x86/oprofile/op_model_ppro.c
> delete mode 100644 xen/arch/x86/oprofile/op_x86_model.h
> delete mode 100644 xen/arch/x86/oprofile/xenoprof.c
> delete mode 100644 xen/common/compat/xenoprof.c
> delete mode 100644 xen/common/xenoprof.c
> delete mode 100644 xen/include/xen/xenoprof.h
>
> diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
> index 7f15204c3885..b12fd10e6315 100644
> --- a/xen/include/public/xen.h
> +++ b/xen/include/public/xen.h
> @@ -106,7 +106,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
> #define __HYPERVISOR_nmi_op 28
> #define __HYPERVISOR_sched_op 29
> #define __HYPERVISOR_callback_op 30
> -#define __HYPERVISOR_xenoprof_op 31
> +#define __HYPERVISOR_xenoprof_op 31 /* Dropped in Xen 4.22 */
> #define __HYPERVISOR_event_channel_op 32
> #define __HYPERVISOR_physdev_op 33
> #define __HYPERVISOR_hvm_op 34
> diff --git a/xen/include/public/xenoprof.h b/xen/include/public/xenoprof.h
> index 2298b6759ed3..f97a67042e07 100644
> --- a/xen/include/public/xenoprof.h
> +++ b/xen/include/public/xenoprof.h
> @@ -3,7 +3,7 @@
> * xenoprof.h
> *
> * Interface for enabling system wide profiling based on hardware
> performance
> - * counters
> + * counters. Dropped from Xen in 4.22.
> *
> * Copyright (C) 2005 Hewlett-Packard Co.
> * Written by Aravind Menon & Jose Renato Santos
Reviewed-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Some question: do we plan to drop xenoprof.h headers at some point (even
if not today) ?
Teddy
--
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |